1 Reply Latest reply on Oct 10, 2017 2:05 PM by jru

    Can I populate a process book trand chart with values I calculated in VBA (code behind)

    DanielPesch

      Can I populate a process book trend chart with values I calculated in VBA (code behind). The code I'm writing calculates an array of 48 values, now I want to populate the trend chart with these new values (not in pi). Is there any sample code showing how to do this (or similar)?

       

      Daniel

        • Re: Can I populate a process book trand chart with values I calculated in VBA (code behind)
          jru

          Hi Daniel,

           

          Thanks for posting on PI Square.

           

          Unfortunately, no.  In order to trend values in the trend object, you must have a data item that is either: a PI Tag, AF Attribute, Element Relative AF Attribute, ODBC connection, or PI Calculation.  

           

          How complicated is the VBA calculation?  Is there a reason that you need to have values to be calculated in VBA as opposed to the native PI Calculations in Processbook? What is the calculation's end goal?  Perhaps we can translate it into something that a Trend Object can accept?

           

          ~Jesse

          1 of 1 people found this helpful