|
|
Rank: Member Groups: Member
Joined: 7/5/2010 Posts: 27 Location: Texas
|
Anyone ever figure out a way to have a functioning PB trend on a userform in PB? Not just an image of one, but one that behaves as a normal trend in a .pdi.
I'm not sure if ithere would have to be a .pdi displayed on a form and a trend in it or if a trend can be 'hosted' on a userform.
Any help would be most appreciated!
jhCoxx
|
|
|
|
|
OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System. We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ or contact OSIsoft vCampus for more details.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
Hi jhCoxx, Welcome to the forum. The issue here is going to be legality as the PI Trend control is not a seperate product in its own right, it is OSIsoft's own software and such cannot be used "on it's own". You would need to host an entire .PDI file via the display ActiveX control - I will dig out some examples of this. Cheers. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Member Groups: Member
Joined: 7/5/2010 Posts: 27 Location: Texas
|
Hmm - my attempt to use a Quick Reply seems to have failed, so let's see if I can reproduce it -
Thanks for the quick reply!
Actually, legality isn't an issue because what I want to do is display a trend on a userform within ProcessBook.
That may sound a bit odd, but the goal is to give the user a trend that can be moved to various positions on the 'base' display while PB is in Run mode - and that's the most user-friendly way I can think of doing it.
I've created a trend in the base display, then created buttons, moved them on top of the trend (in the space to the right of the trend title), and then grouped the whole thing. Then, I wrote VBA macros to have button clicks move the trend by 100 units (using the trend .Top and .Left properties). It't works, but it's an awfully clunky and user-unfriendly way to move the trend.
Another possibliity would be to create a second, smaller display - just big enough to hold a medium-sized trend - and then have it above the 'base' trend - probably this can be done, but there are concerns of making sure the smaller display doesn't get moved behind (under) the base display and effectively disappear. Besides, it would be good to use something a bit lighter in code and CPU / memory resources than creating another display.
The PI Trend Control (available via the More Controls feature on the PB userform toolbox listing) doesn't work with PB userforms - apparently it only works on Excel. The work-around of adding an Excel control to a PB userform and then adding a PI Trend Control in that Excel control is entirely too baroque to be attractive, as is using a IE control on a PB userform and then trying to put a RTwebpart trend on that...
I'm looking forward to hearing more about the idea of using a Display ActiveX control on a PB userform - I didn't see that as one of the options, but then I might not have had the correct reference set in VBA's Tools | References.
Again, thanks for your time on this!
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 617 Location: Cheshire, United Kingdom.
|
OK I understand where you are coming from. Well to display a display (.pdi) file on a user form you need to add the control "PI Activeview Control", then with this on your user form you just set the "DisplayURL" property as the path to a display file. In your particular instance what you may want to do is create a temporary display (in users temp directory?) that you show on your user form, you can just stick one trend on there and make the PI ActiveView Control fit the sizeof the trend and your user form fit the size of the control, this way it looks like you have just added a trend. If you need to manipulate the trend (depending on your base display) then just to automation to open it, change it and save it. Then reload it on your user form. As an alternative, you could create a .Net add-in for ProcessBook and use .Net charting to show trend data... Hope this helps. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Member Groups: Member
Joined: 7/5/2010 Posts: 27 Location: Texas
|
I'll check out the PI ActiveView control idea - not sure if we've licensened ActiveView as a product, although the ActiveView control might be part of some other license we do have. The question becomes - can the user manipulate the trend in the ActiveView control (drop cursors, see tool-tip displays, add traces, etc) ir is it just a display of a trend?
The .Net charting idea is less appealing than using a separate on-top display - the need to give the users a consistent loook-and-feel on how to work with any 'trend' in PB is too great, and it would be vastly beyond my abilities to make a .Net 'trend' behave identically to a native PB trend...
|
|
|
|
Guest
|