14 Replies Latest reply on Nov 19, 2010 8:39 PM by owluser

    How Best to Do this in Processbook?

    owluser

      I need to create a "Plant Status" Oject with multiple PI Tag Driven symbols (Ellipses, Arcs, etc) that needs to be shown at all times, regardless of which PI Display is Open.

       

      Can I create this object with Visual Studio 2008 (VB) and embed this Object in a Custom Toolbar?

       

      Can can I create an Add-In to provide this type of functionality?

       

      Or, must I create an Active X control and embed it into each display?

       

      Lastly, does the version of Processbook I use make a difference for any of these options?  I am currently using PI-Processbook version 3.1.0.1

        • Re: How Best to Do this in Processbook?

          Sounds to me like you want an add-in, a docked window add-in.  Then you could code it up so that it is always visible (force it's position to always be top so it looks like a toolbar) and hook up to your relevant PI Points via PISDK using Event Pipes.  What will the symbols represent, something like traffic light KPIs?

           

           

           

           

            • Re: How Best to Do this in Processbook?
              owluser

              I need to create Power Plant Status Indicators based off Digital PI Tags that depending on their value change the properties of PI Symbol objects.  In addtion, some of the PI Symbol objects have standard MultiState functionality.

               

              Plant Status

               

               

               

               

               

               

               

               

               

              Here's some of the VBA code that I'm currently using in a Processbook Display:

              Set My_Ellipse_Symbol = dis.CSF_S_Ellipse
              Set My_Arc_Symbol = dis.CSF_S_ARC
              Set MyTagValue = My_Ellipse_Symbol.GetPIValue

              If MyTagValue = "GREEN" Then
                      My_Arc_Symbol.Visible = True
                      My_Arc_Symbol.EndAngle = 90

              I've got the PI Processbook Addin Template stuff that OSIsoft made available.  Do you think this would work as a starting point for what I need to do?

               

              Or perhaps you've done somthing similar?

                • Re: How Best to Do this in Processbook?
                  Ahmad Fattahi

                  Andy,

                   

                  You can see this vCampus-exclusive Webinar on the exact same topic. it should help you starting off your project. Good luck

                    • Re: How Best to Do this in Processbook?
                      dhollebeek

                      Andy Holmes

                      Can I create this object with Visual Studio 2008 (VB) and embed this Object in a Custom Toolbar?

                       

                      Putting UserControls (or Active-X components) into a custom toolbar isn't supported in any released version of PB.  It will be supported in PB 2011, I believe.

                       

                      Andy Holmes

                      Can can I create an Add-In to provide this type of functionality?

                       

                      There are several ways you can do this in an Add-In.  First of all, you can create a docking window add-in and put a UserControl in the docking window, but you can't put PB symbols in the UserControl, so you'd have to handle the retrieval and painting of the symbols yourself.  There is a way to get around this (see below).  Or, if you just reserved a set amount of space for the symbols on the top of each display, you could create an add-in that added the symbols to each display as it was loaded.

                       

                      Andy Holmes

                      Or, must I create an Active X control and embed it into each display?

                       
                      There already is an Active X control which displays PB PDI files called pdbctrl.  It shows up in the MS COM window as "PI ActiveView Control".  I'm not sure whether you need to buy an ActiveView license or not to use it though.  Anyway, then you can create a PDI with the status info and either embed it directly into a PB display, or into a docking window that is created.  One drawback is that this control is notoriously slow.
                        • Re: How Best to Do this in Processbook?

                          David Hollebeek

                          There already is an Active X control which displays PB PDI files called pdbctrl.  It shows up in the MS COM window as "PI ActiveView Control".  I'm not sure whether you need to buy an ActiveView license or not to use it though.
                          Yes, you do need a license for it; PI ActiveView is a product in and of itself. Please contact your Account Manager if you need more information on this.

                          • Re: How Best to Do this in Processbook?
                            owluser

                            I was able to create a UserControl with the pbdctrl control embedded into it.  I then was able to put this UserControl into a PB Docking Window.

                             

                            But this is where it gets interesting.  Apparently, once the docking window loads, the PI ActiveView Control maintains Focus and won't allow you to properly shift the focus to Processbook.  This means that you don't have access to the "normal" Processbook menu bar items, unless you first File/Close the AcitveView Control.

                             

                            I'm not sure how to "Disable" Focus to the ActiveView Control that's embedded into the Docking Window; or, this is a "bug" in the pdbctrl control functionality.

                             

                            I really need to make this work, so if you need more info, I can elaborate further...

                              • Re: How Best to Do this in Processbook?
                                dhollebeek

                                I was afraid something like that might happen.  We are kind of pushing the bounds of what ActiveView was designed to support.  I'll see if I can find a workaround for that.

                                  • Re: How Best to Do this in Processbook?
                                    dhollebeek

                                    Have you tried putting a Microsoft System.Windows.Forms.WebBrowser control in the docking window and setting the URL to the AV display?  That might work better because then AV is running in an environment that it is more used to.

                                      • Re: How Best to Do this in Processbook?
                                        owluser

                                        I was able to solve the MenuBar Issue by Installing PI-ActiveView.

                                         

                                        Apparently, without PI-ActiveView installed, a second instance of PI-Processbook must load to drive the ActiveView Control, and this is what must be causing the MenuBar "overlap".

                                         

                                        I have another Issue, however.  When my DockWindow Add-In loads on Startup, the Menubar View Item Selection doesn't work properly.  When I Unload the Add-in and Reload it, then all is well.  I made an .SWF video capture of this behavior on my computer that I can email to you if you'd like.

                                         

                                        I've seen some other posts about how to control the Order that Add-Ins load.  Am I not doing something in the code of my Add-In, or is this something that I need to configure in PI-Processbook or a Config (.INI) file?