I have a scenario where I need to create an Event Frame (let's call it EF1) and I need to add a reference to an already existing Event Frame (let's call it EF0); this can be done in PI System Explorer by creating EF1, then right clicking it and choosing New > Add Event Frame Reference ...
How do I duplicate this behavior programatically? I've tried:
AFReferenceType efRef = new AFReferenceType("efReference", "ef", "associatedEf"); efRef.Strength = AFReferenceStrength.Weak; ef1.EventFrames.Add(ef0, efRef);
In both cases, the object in code appears to have the event frame added, but searching for and viewing the event frame in PI System Explorer doesn't show any child/referenced event frames.