AnsweredAssumed Answered

PI AF SDK - Update string value of an attritube

Question asked by santhosh2r2 on Mar 27, 2017
Latest reply on Mar 28, 2017 by ekuwana


i am novice to PI AF SDK. Im challenged with the task to update the value of an attribute of string data type. The data reference is null.

Is there any method available for this task? Please find below a compressed version of my code.


I have tried to use AFValue, but no success.


public void SetAttr()


            List<string> path = new List<string>();


            CurrSubElements = DbAF.Elements;

            var q = AFElement.FindElementsByPath(path, null);

             var t = q[@"\\DESKTOP-945B9S8\BASTEST\Location\Pumps\P8182"].Attributes["Type"].Attributes["SourceTag"].Data;

               // Update the value of the attribute "SourceTag" to "TestString"



Any pointers for solving this would be highly appreciated.