Hello,
I would like to gather all attributes that are with None data reference.
Please share any sample script, if possible
Thanks,
piyush
Hello,
I would like to gather all attributes that are with None data reference.
Please share any sample script, if possible
Thanks,
piyush
Below is some sample code that would gather all attributes with none data reference. Note, I have not optimized it all for performance.
string query = "Element: {Name:'*'} Plugin:''"; using(var search = new AFAttributeSearch(afDatabase,"noAttributes", query)) { var results = search.FindObjects(0, false, 100); { foreach (AFAttribute attribute in results) { //do work } } }
There is a post that will resolve outputs, but you can change it to inputs and then check each attribute's data reference: https://pisquare.osisoft.com/s/question/0D51I00004UHhCcSAL/using-afsdk-how-to-tell-if-an-attribute-is-mapped-to-an-analysis-output
Let us know what you come up with!
Hi (Missing Content) ,
This is what worked for me
Oh nice! Thanks for sharing!
Oh nice! Thanks for sharing!