I am using .Net platform for development, I am stuck to get child attribute time series values.
There is Element 1 which is having no. of attributes in it, in some of the attributes there are child attributes in it.
All the child attributes are having same name (i.e. Attribute 1 have child attributes named Child Attribute 1, Child Attribute 2, Child Attribute 3 same Attribute 2 have child attributes named : Child Attribute 1, Child Attribute 2, Child Attribute 3)
Now, I am able to read and get Attribute 1, Attribute 2... time series data by pi point interpolated values but i am not able to get child attributes time series values
below is the code snippet I use to get interpolated values
Dim range As AFTimeRange = New AFTimeRange(New AFTime(paramFromDate), New AFTime(paramToDate))
Dim span As New AFTimeSpan(0, 0, 0, 0, 0, PiConfiguration.DataStepRate, 0)
Dim Values As AFValues = Nothing
Values = piPoint.InterpolatedValues(range, span, Nothing, False)
for the child attributes i tried to get pi point as below but it is not getting the same.
objAttribute.Attributes.Item(2).PIPoint (in this code objAttribute refers to Attribute 1)
kindly any one help me out to get child attribute's time series data by interpolated values, I am stuck on this.
- Sujit Kodiyatar
You could do it in one go with a AFAttributeList...for example:
OSIsoft.AF.Asset.AFAttributeList al = new OSIsoft.AF.Asset.AFAttributeList(); al.Add(element.Attributes["Attribute 1"]); al.Add(element.Attributes["Attribute 1"].Attributes["Child Attribute 1"]); var values = al.Data.InterpolatedValues(range, span, "", false, new OSIsoft.AF.PI.PIPagingConfiguration(OSIsoft.AF.PI.PIPageType.EventCount, 10000));