White Paper - A Few PI ProcessBook VBA Tips

Document created by asorokina Employee on Aug 18, 2015
Version 1Show Document
  • View in full screen mode

This document contains a loose collection of various examples that can prove useful to manipulate PI ProcessBook displays and objects. Some of these examples were previously provided as standalone elements and were re-written and grouped for clarity purposes.


A brief overview of the content:

  • "One-Click Value Trend" VBA Script

          The "One-Click Value Trend" VBA script places a displayed value into a PI ProcessBook trend when it is selected.

  • "One-Click Value Ad Hoc Trend" VBA Script

          This VBA script automates the "Ad Hoc trending" functionality of the PI ProcessBook. When youu click any value in the display, an ad hoc trend appears.

  • Creating XYPlots Programmatically
  • "SetViewPort" VBA code snippet

          PI ProcessBook displays can be huge and the amount of information can be overwhelming. With the help of VBA we can zoom the view to a certain area to catch the eye of the observer.

  • "Modified" property

          This is an example of using the PI ProcessBook Display property called Modified.

  • Pass the Context from Parent to Child (Module Relative Display)
  • Pass the Context from Parent to Child (Element Relative Display)
  • Replace Macros in bulk

          This script replaces existing macros across all display entries of a PI ProcessBook Workbook (PIW) file