I am referencing a complex element using the AF SDK and only want to see Attributes related to a specific category.
I'm using VB.Net and the only methods that I see are:
Categories - which is a user defined collection of categories for the object that can be used for querying or reporting.
CategoriesString - which is a property that returns a string containing a semi-colon separated list of the categories.
These are exposed after I connect to my PI Server, AF Server and database and I instantiate an element.
Dim myPISystems As New OSIsoft.AF.PISystems() Dim myPISystem As OSIsoft.AF.PISystem Dim myAFDB As OSIsoft.AF.AFDatabase Dim myElement As OSIsoft.AF.Asset.AFElement Dim sString as String ' Connect to the default PI Server and the AF database named "test" myPISystem = myPISystems.DefaultPISystem myAFDB = myPISystem.Databases("test") myElement = myAFDB.Elements.Item(1) sString = myElement.CategoriesString() ' This returns an empty string.
Any suggestions are appreciated. Ultimately, I am trying to query AF for elements that are only part of a specific category so I can minimize the data returned. My next question is going to be about using GetInputs instead of GetValue. Feel free to answer this question also.
Thanks in advance,