When I create a child event frame in PI System Explorer, it defaults to being a "proper" child, creating an object that sits under the parent. If I create an event frame using the AFSDK, and add it as a child of another event frame, it defaults to being an object created at the root level, and it is associated with the other event frame as a child.
Eg - you can see that the "Child via SDK" has the icon indicating it is added as a reference object; the "ChildFrame vis PSE" does not.
Now: I know that I can enforce the newly-created EventFrame in the SDK to be a child by setting the IsRoot property:
EventFrame = new AFEventFrame(database, Name, EventFrameTemplate); if (parent != null) { Parent.EventFrames.Add(EventFrame); EventFrame.IsRoot = false; }
I am not trying to do anything like a 1:many (setting one event frame to be the child of many others). Whether I set the IsRoot = false or not, everything 'works' - I can quite happily enumerate the Parent.EventFrames collection, and the Eventframe can be accessed.
My question is really whether there is a technical reason as to whether one approach is better than the other? For example, does one approach lead to better (or worse) search performance for event frame searches?
My preference is to set the IsRoot = false and have the objects set as child objects, mainly because it seems tidier in my mind, but ultimately the technical considerations should take precedence over 'aesthetics'.