tgreen

Drilling down to Sub Elements

Discussion created by tgreen on Sep 9, 2014
Latest reply on Sep 12, 2014 by Gregor

In PI ACE, what would be the correct way to reference a sub element?

 

For example:

 

Parent Element

 

--Element1

 

--Element2

 

--Element3

 

In PI ACE, I would want to set up the context reference to 'Parent Element', but within the script (likely using PISDK.PIPoint??), make reference to sub Element's attributes after returning the list of sub elements (may not have 3 as listed above):

 

something like:?

 


 

Dim myContext As PISDK.PIModule = PIACEBIFunctions.GetPIModuleFromPath(Context)

 


 

do a loop through the count of sub elements with the following in mind (don't want to clutter this up with VB code)

 

 

 

Dim MyTag As PISDK.PIPoint = myContext.PIAliases("Element1\Attribute1").DataSource

 

MyTagEU= MyTag.PointAttributes.GetAttributes.Item("EngUnits").Value

 


 

I might be way off base here, so correct my ignorance if need be!!

 

Thanks in advance!

Outcomes