AnsweredAssumed Answered

How do I set an Element Attribute to an Element using the AFSDK and AF Builder?

Question asked by Hoa.Tram on Nov 14, 2019
Latest reply on Nov 15, 2019 by sraposo

I have an AF Element (let’s call it “X”).  It has an element attribute called “Element” with Value Type Element.  I have another Element “Y” that I want X|Element to be set to.  How do I do that using the AFSDK?  How do I do that in a AF Builder script?  Right now, I can only set it using PI System Explorer, clicking on the “…” button next to Value and navigating to the Element that I want to set it to.  But this is not scalable for a large number of elements.

 

I have the full Element path in both the application that builds the referencing Element X as well as in the referencing Element itself as an attribute (Value Type string) named "Element Path" .  I would like to automatically populate the X|Element attribute either during the referencing element’s creation vi AF Builder, or the first time I go to resolve the Element from the path string using the AFSDK.

Outcomes