3 Replies Latest reply on Sep 29, 2009 2:23 PM by spilon

    Enable/Disable Toolbar Icons based on ProcessBook Events

    CalebH

      Hello,

       

        I was wondering if there is a way to enable/disable toolbar buttons based on ProcessBook events - for example when you open ProcessBook and the demo screen opens by default (usually).  When you close it most of the toolbar buttons turn gray.  Is it possible to pick up on and code around these events?  In Excel it is possible to catch these events by creating a special "EventClassModule" class which allows access to "App_NewWorkbook" and "App_WorkbookBeforeClose" events, etc.  Is there an equivalent in ProcessBook?  If so, how can we use it?

       

      Thanks!
      Caleb

        • Re: Enable/Disable Toolbar Icons based on ProcessBook Events

          The simple way to achieve this is with a .NET ProcessBook add-in, as opposed to file-bound VBA code. This will give you access to the PBObjLib.Application object and its events, such that you can implement event handlers around events like "NewDisplay", "NewProcBook", etc. You also gain access to the Display(s) within the PI ProcessBook environment and their events such as "Display_BeforeClose".

           

          You can find templates on the vCampus Download Center (in the "Supporting Files" category) to get you started in .NET ProcessBook Add-Ins development. We also held a webinar on the topic and its recording is available here on the vCampus Auditorium. And of course, don't hesitate to post your other questions in this very forum!

           

          Happy coding!