I'm trying to get attributes values to plot them in a graph. This information is importante: the graphs have more than one trend (each one from a different attribute).
To do this, I'm using the code below:
protected override IList<AFValues> GetAttributesValues(IEnumerable<string> pointNames, AFTimeRange timeRange, int intervals, PIPagingConfiguration paging)
var attributes = AFAttribute.FindAttributesByPath(pointNames, null).Results;
var attributesList = new AFAttributeList(attributes.Values);
return intervals == 0 ?
attributesList.Data.RecordedValues(timeRange, AFBoundaryType.Inside, null, true, paging).ToList() :
attributesList.Data.PlotValues(timeRange, intervals, paging).ToList();
I'm not an expert in AF SDK, but I read that using attributesList.Data is the fastest way to retrieve values from attributes.
The problem is that the AF SDK (PI AF Client 2014 R2 - 188.8.131.5238) is returning a message tell me that PlotValues and RecordedValues are not supported to an specific attribute.
This attribute is configured in PI Explorer as:
I get the values from this attribute using the method GetValues, but I don't know if this is the more performatic way.
So, I need some help to develop a code that works with performance and be able to handle diferent kinds of datareference configurations.
Thank you in advance!