telventaustralia

How to add a PI Point in to a XY-Plot from .NET VB code?

Discussion created by telventaustralia on Jun 19, 2009
Latest reply on Jun 19, 2009 by telventaustralia

Hi. How to add a XY-Plot (X and Y Tag) from AF SDK code on any existing Process Book active XY-plot? For example from Process Book VBA code, we can add a tag to the existing XY-plot as follows:

 
Dim aDefinition As XYDefinition
Set aDefinition = ThisDisplay.SelectedSymbols.Item(1).GetDefinition
aDefinition.Tags.Add (sTagName)
ThisDisplay.SelectedSymbols.Item(1).SetDefinition aDefinition
Set aDefinition = Nothing

Now we need to execute similar thing from the AF SDK code. Our base template is OSIsoft's PB add-in .Net VB code. From this template, we can add a trace in trend without any problem. Now we need to add a PI point or AF Attribute to the XY-Plot. Thanks in advance for any help.

Outcomes