AnsweredAssumed Answered

Problem in Add Referenced Element while creating Event Frame using AF SDK

Question asked by Sasanka on May 20, 2020
Latest reply on May 20, 2020 by Sasanka

Hi All,

I am creating and event frame using AF SDK

and I am trying to link Referenced Element while creating as below code shows.

But  Referenced Element is not added when I check in PI System Explorer.

 

Any idea??

 

//Get element Tempate
AFElementTemplate efTemplate = GetElementTemplate(assetServer, assetDb, templateName);


//Get AF Databse
OSIsoft.AF.AFDatabase afDatabase = Handler.GetAFDatabase(assetServer, assetDb);

 

// Set element Reference
AFEventFrame newEf = new AFEventFrame(afDatabase, "TestName", efTemplate)
{
   PrimaryReferencedElement = new AFElement("Element Name")
};

newEf.CheckIn();

Outcomes