AFEventFrames.Add Method (String)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.EventFrame
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFEventFrame Add( string name )
Public Function Add ( name As String ) As AFEventFrame Dim instance As AFEventFrames Dim name As String Dim returnValue As AFEventFrame returnValue = instance.Add(name)
public: AFEventFrame^ Add( String^ name )
member Add : name : string -> AFEventFrame
Parameters
- name
- Type: SystemString
The name for the new AFEventFrame object. The name must be unique within the collection. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name.
Return Value
Type: AFEventFrameReturns the newly added AFEventFrame object.
Remarks
When an AFElementTemplate is not specified, properties that are normally defined by the template are defined by the event frame instead. When a template is specified, the default value of the Description property of the new event frame is the same as the description of the template; however, it can be changed by the user. All other properties are defined by the template and cannot be modified without changing the template.
When an AFReferenceType is not specified, the new AFEventFrame is added to this collection using the default AFReferenceType. For the default view, the default AFReferenceType is the standard Parent-Child reference type.
To create a new or existing child event frame of another event frame, use one of the Add Overload methods the event frame's AFEventFrame.EventFrames collection. If the parent event frame is temporary (see IsTemporary), then the new child event frame will also be temporary.
There can only be a single hierarchical relationship between two event frames. This means that you cannot insert an existing event frame into an event frames collection that already contains that event frame. There is a restriction that allows an event frame to have only two relationships to another event frame and their AFReferenceStrength cannot be Composition. This means that an event frame can have a maximum of two parents. |