AFEventFrame Class
- Last UpdatedNov 18, 2025
- 20 minute read
- PI System
- AF SDK 2024 R2
- Developer

Inheritance Hierarchy
SystemObject
OSIsoft.AFAFObject
OSIsoft.AF.AssetAFBaseElement
OSIsoft.AF.EventFrameAFEventFrame
OSIsoft.AF.AnalysisAFCase
OSIsoft.AF.EventFrameAFTransfer
OSIsoft.AFAFObject
OSIsoft.AF.AssetAFBaseElement
OSIsoft.AF.EventFrameAFEventFrame
OSIsoft.AF.AnalysisAFCase
OSIsoft.AF.EventFrameAFTransfer
Namespace: OSIsoft.AF.EventFrame
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public class AFEventFrame : AFBaseElement, IAFTimePeriod, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFEventFrame>, IEquatable<AFEventFrame>
<SerializableAttribute> Public Class AFEventFrame Inherits AFBaseElement Implements IAFTimePeriod, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable(Of AFEventFrame), IEquatable(Of AFEventFrame) Dim instance As AFEventFrame
[SerializableAttribute] public ref class AFEventFrame : public AFBaseElement, IAFTimePeriod, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFEventFrame^>, IEquatable<AFEventFrame^>
[<SerializableAttribute>] type AFEventFrame = class inherit AFBaseElement interface IAFTimePeriod interface IAFTransactable interface IAFChangedEvent interface IAFSecurable interface IComparable<AFEventFrame> interface IEquatable<AFEventFrame> end
The AFEventFrame type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AFEventFrame(AFDatabase) |
Initializes a new instance of the class with default values.
| |
| AFEventFrame(AFDatabase, String) |
Initializes a new instance of the class with the specified name.
| |
| AFEventFrame(AFDatabase, String, AFElementTemplate) |
Initializes a new instance of the class with the specified name.
| |
| AFEventFrame(AFDatabase, String, AFElementTemplate, AFAnalysis, Boolean) |
Initializes a new instance of the class with the specified name.
|
Properties
| Name | Description | |
|---|---|---|
| AcknowledgedBy |
This property indicates by whom the AFEventFrame was acknowledged.
| |
| AcknowledgedDate |
This property indicates when the AFEventFrame was acknowledged.
| |
| Analysis |
The AFAnalysis which created this object.
| |
| AreValuesCaptured |
This property indicates whether the AFEventFrame has captured its
AFAttribute values.
| |
| Attributes |
This is a collection of attributes that are owned by this element.
(Inherited from AFBaseElement.) | |
| CanBeAcknowledged |
This property indicates whether the AFEventFrame can be acknowledged.
| |
| Categories |
This is a user-defined collection of categories for the object that can be used for
querying and/or reporting purposes.
(Inherited from AFBaseElement.) | |
| CategoriesString |
This read-only property returns the list of categories in a string separated by semicolons.
(Inherited from AFBaseElement.) | |
| CheckOutInfo |
This read-only property returns the checked out status information for the object.
| |
| Database |
This read-only property returns the AFDatabase where this object is defined.
(Inherited from AFBaseElement.) | |
| DefaultAttribute |
The default AFAttribute for the AFBaseElement.
(Inherited from AFBaseElement.) | |
| DefaultInputPort |
The default input AFPort for the AFBaseElement.
(Inherited from AFBaseElement.) | |
| DefaultOutputPort |
The default output AFPort for the AFBaseElement.
(Inherited from AFBaseElement.) | |
| DefaultUndirectedPort |
The default undirected AFPort for the AFBaseElement.
(Inherited from AFBaseElement.) | |
| Description |
Read/write property that provides a more detailed description of the object.
(Inherited from AFBaseElement.) | |
| Duration | ||
| EndTime |
This read-only property represents the end time of the period.
| |
| EventFrames |
This is a collection of child event frames that have been added to this event frame.
| |
| ExtendedProperties |
A dictionary of extended properties that can be used to store application specific information.
(Inherited from AFBaseElement.) | |
| HasChildElements |
This read-only property returns if the event frame has child elements.
| |
| HasChildEventFrames |
This read-only property returns if the event frame has child event frames.
| |
| ID |
Read-only property that provides a unique identifier for the object to be used for
quick access that is not dependent upon the index.
(Inherited from AFObject.) | |
| Identity |
This read-only property contains identity of the object.
(Inherited from AFObject.) | |
| IsAcknowledged |
This property indicates whether the AFEventFrame has been acknowledged.
| |
| IsAnnotated |
This property indicates whether this element has any annotations.
(Inherited from AFBaseElement.) | |
| IsDeleted |
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.) | |
| IsDirty |
This read-only property indicates whether the object has been modified since the
last save to the PI AF Server.
| |
| IsLocked |
This property indicates whether the AFEventFrame has been locked.
| |
| IsNew |
This read-only property indicates whether the object is new and has never been saved
to the PI AF Server.
| |
| IsRoot |
This property indicates if the AFEventFrame is a root object owned by
the AFDatabase.
| |
| IsTemporary |
This property indicates whether the AFEventFrame is temporary.
A temporary AFEventFrame cannot be saved to the server.
| |
| Name |
Read/write property that identifies the name of the object.
(Inherited from AFBaseElement.) | |
| Parent |
This read-only property is returns the parent AFEventFrame that owns the event frame if it
is referenced by another event frame.
| |
| Parents |
This is a collection of all AFEventFrame objects that reference this event frame.
| |
| PISystem |
This read-only property allows access to the PISystem associated with this
object.
(Inherited from AFObject.) | |
| Ports |
This is a collection of AFPort objects representing the possible connection ports
for this element.
Ports are used in a AFModel to define an AFConnection
between AFBaseElement object.
(Inherited from AFBaseElement.) | |
| PrimaryReferencedElement |
The primary referenced AFElement associated with the event frame.
| |
| ReferencedElements |
This is a collection of elements that are referenced by this event frame.
| |
| Security |
This read-only property returns the AFSecurity information for the object.
| |
| Severity |
This is the severity level associated with the event.
| |
| StartTime |
This read-only property represents the start time of the period.
| |
| Template |
The AFElementTemplate that was used to define this object.
(Inherited from AFBaseElement.) | |
| TimeRange | ||
| Type |
This read-only property specifies the base type of the element.
(Inherited from AFBaseElement.) | |
| UniqueID |
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.) |
Methods
| Name | Description | |
|---|---|---|
| Acknowledge(IListAFEventFrame) |
Acknowledge all AFEventFrame objects in the collection.
| |
| Acknowledge(String, NullableAFTime) |
Acknowledges a single AFEventFrame.
| |
| ApplyChanges |
This method applies the changes to the object and makes
those changes available to other objects for the current user.
| |
| CaptureValues |
Capture and cache the AFAttribute values with a AFDataReference
using the default non-cached data provider.
| |
| CaptureValues(IAFDataProvider) |
Capture and cache the AFAttribute values with a AFDataReference
using the specified IAFDataProvider.
| |
| ChangeReferenceType |
Change the existing AFReferenceType between a child event frame.
| |
| CheckIn |
This method checks in (commits) all the changes to the object by saving
the information to persistent storage.
| |
| CheckOut |
This method locks the object so that its configuration can be modified.
| |
| CheckOutEventFrames |
Check out the objects with the specified unique identifiers at the specified query date.
| |
| CompareTo(Object) |
Compares this instance with a specified Object.
(Overrides AFObjectCompareTo(Object).) | |
| CompareTo(AFEventFrame) |
Compares this instance with a specified AFEventFrame.
| |
| CompareTo(AFObject) |
Compares this instance with a specified AFObject.
(Inherited from AFObject.) | |
| CreateElementTemplate |
Create an AFElementTemplate based upon the element.
(Inherited from AFBaseElement.) | |
| Delete |
Deletes this event frame from the AFDatabase.
| |
| DeleteEventFrames |
Delete the objects with the specified unique identifiers.
| |
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Overrides AFObjectEquals(Object).) | |
| Equals(AFEventFrame) |
Indicates whether the current object is equal to another object of the same type.
| |
| Equals(AFObject) |
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.) | |
| FindEventFrame(PISystem, Guid) |
Retrieves the AFEventFrame object with the specified unique identifier
at the AFTime.MaxValue query date.
| |
| FindEventFrame(PISystem, Guid, Object) |
Retrieves the AFEventFrame object with the specified unique identifier at
the specified query date.
| |
| FindEventFrames(PISystem, Guid, Object) |
Performs a search within the PISystem to retrieve a collection
of AFEventFrame objects with the specified list of unique identifiers.
| |
| FindEventFrames(AFDatabase, AFEventFrame, String, AFSearchField, Boolean, AFSortField, AFSortOrder, Int32, Int32) |
Performs a paged text search within the AFDatabase to retrieve a collection
of AFEventFrame objects which have a field that matches the specified query string.
| |
| FindEventFrames(AFDatabase, AFEventFrame, Object, Int32, Int32, AFEventFrameSearchMode, String, String, AFCategory, AFElementTemplate, Boolean) | Obsolete.
Retrieves a paged list of AFEventFrame objects limited to the specified
count beginning at the requested time in the specified direction that match the
specified filtering conditions.
| |
| FindEventFrames(AFDatabase, AFEventFrame, Object, Int32, Int32, AFEventFrameSearchMode, String, String, AFCategory, AFElementTemplate, AFElementTemplate, Boolean) | Obsolete.
Retrieves a paged list of AFEventFrame objects limited to the specified
count beginning at the requested time in the specified direction that match the
specified filtering conditions including referenced element template filter.
| |
| FindEventFrames(AFDatabase, AFEventFrame, AFSearchMode, Object, Object, String, String, AFCategory, AFElementTemplate, AFDurationQuery, Boolean, AFSortField, AFSortOrder, Int32, Int32) | Obsolete.
Retrieves a paged list of AFEventFrame objects that match the
specified filtering conditions.
| |
| FindEventFrames(AFDatabase, AFEventFrame, AFSearchMode, Object, Object, String, String, AFCategory, AFElementTemplate, AFElementTemplate, AFDurationQuery, Boolean, AFSortField, AFSortOrder, Int32, Int32) | Obsolete.
Retrieves a paged list of AFEventFrame objects that match the
specified filtering conditions including referenced element template filter.
| |
| FindEventFramesByAnalysis(AFAnalysis, AFSearchMode, Object, Object, AFSortField, AFSortOrder, Int32, Int32) | Obsolete.
Retrieves a paged list of AFEventFrame objects that were created by the
specified AFAnalysis that match the specified filtering conditions.
| |
| FindEventFramesByAnalysis(AFAnalysis, Object, Int32, Int32, AFEventFrameSearchMode, String, String, AFCategory, AFElementTemplate, Boolean) | Obsolete.
Retrieves a paged list of AFEventFrame objects that were created by the
specified AFAnalysis limited to the specified count beginning at the
requested time in the specified direction.
| |
| FindEventFramesByAttribute(AFEventFrame, Object, Int32, Int32, AFEventFrameSearchMode, String, String, AFDurationQuery, AFAttributeValueQuery, Boolean) | Obsolete.
Performs a search on the event frame's information and attribute value within the
AFDatabase to retrieve a paged list of AFEventFrame objects
limited to the specified count beginning at the requested time in the specified direction.
| |
| FindEventFramesByAttribute(AFEventFrame, AFSearchMode, Object, Object, String, String, AFDurationQuery, AFAttributeValueQuery, Boolean, AFSortField, AFSortOrder, Int32, Int32) | Obsolete.
Performs a search on the event frame's information and attribute value within the
AFDatabase to retrieve a paged collection of AFEventFrame objects.
| |
| FindEventFramesByExtendedProperty(AFDatabase, String, IEnumerableGuid, Int32) |
Retrieves a list of AFEventFrame objects that have the specified extended property
Guid values defined for the event frame.
| |
| FindEventFramesByExtendedProperty(AFDatabase, String, IEnumerableString, Int32) |
Retrieves a list of AFEventFrame objects that have the specified extended property
string values defined for the event frame.
| |
| FindEventFramesByPath(IEnumerableString, AFObject) |
Retrieves the AFEventFrame objects identified by the path strings as keyed results.
| |
| FindEventFramesByPath(IEnumerableString, AFObject, IDictionaryString, String) |
Retrieves the AFEventFrame objects identified by the path strings as a list.
| |
| FindEventFramesByReferenceType | Obsolete.
Retrieves a collection of AFEventFrame objects that are referenced by the
AFReferenceType from the specified searchRoot.
| |
| GetAnnotations |
Retrieves a collection of existing AFAnnotation objects belonging to this
AFBaseElement.
(Inherited from AFBaseElement.) | |
| GetAttributeByTrait |
Retrieves the child AFAttribute with the specified AFAttributeTrait.
(Inherited from AFBaseElement.) | |
| GetAttributesByTrait |
Retrieves a list of child AFAttribute objects identified by the specified list of attribute traits.
(Inherited from AFBaseElement.) | |
| GetAttributeValues(PISystem, IListAFAttributeValueQueryID, Object, Boolean, WindowsIdentity) |
This method gets a collection of AFValue objects for the specified attributes.
The collection will be the same length and in the same order as the objectIds collection.
| |
| GetAttributeValues(PISystem, IListAFAttributeValueQueryID, ClaimsIdentity, Object, Boolean) |
This method gets a collection of AFValue objects for the specified attributes.
The collection will be the same length and in the same order as the objectIds collection.
| |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Overrides AFObjectGetHashCode.) | |
| GetParents(AFCategory) |
Retrieves a collection of AFEventFrame objects that reference this event frame
using the specified AFCategory.
| |
| GetParents(AFReferenceType) |
Retrieves a collection of AFEventFrame objects that reference this event frame
using the specified AFReferenceType.
| |
| GetPath |
Returns the full path to the object, using just the names.
(Inherited from AFObject.) | |
| GetPath(AFObject) |
Returns the path to the object relative from another object.
(Inherited from AFObject.) | |
| GetPath(AFEncodeType, AFObject) |
Returns the path to the object relative from another object,
using the name and/or id as specified
by encodeType.
(Inherited from AFObject.) | |
| GetPaths |
Get all the relative paths to this AFEventFrame.
| |
| GetReferenceTypes |
Retrieves a collection of all AFReferenceType objects that represent types
of references from this event frame to its child event frames.
| |
| GetReferenceTypes(AFEventFrame) |
Retrieves a collection of AFReferenceType objects that represent types
of references between this event frame and the specified related event frame.
| |
| GetSecurity |
Gets the AFSecurity information of the specified security item
associated with the object.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsTypeOf |
Checks if the current AFBaseElement is derived from the
specified AFElementTemplate.
(Inherited from AFBaseElement.) | |
| LoadEventFrames(IListAFEventFrame) |
Loads the specified list AFEventFrame objects.
| |
| LoadEventFrames(PISystem, Guid, Object) |
Loads the AFEventFrame objects with the specified unique identifiers at
the specified query date.
| |
| LoadEventFramesToDepth |
Loads the specified list AFEventFrame objects and their child
event frames to the hierarchical depth specified.
| |
| Lock |
Locks this event frame so that no further changes can be made.
| |
| Persist |
This method returns the persistence string for the object.
(Inherited from AFObject.) | |
| Refresh |
Refreshes the client with any changes that have been made to the object since loaded.
| |
| SetEndTime |
Set the time that represents the time that the period ended.
| |
| SetStartTime |
Set the time that represents the time that the period started.
| |
| ToString |
Returns a String that represents the current object.
(Inherited from AFObject.) | |
| UndoCheckOut |
This method discards all the changes to the object and all sub-objects since the
last call to CheckOut. Any changes since the check out will be lost.
| |
| Unlock |
Unlocks a locked event frame so that further changes can be made.
|
Events
| Name | Description | |
|---|---|---|
| Changed |
Event is raised when the object or one of its sub-objects is changed.
|
Operators
| Name | Description | |
|---|---|---|
| Equality |
The equality operator (==) compares its operands to determine if they are equal.
| |
| GreaterThan |
The greater than relation operator (>) compares its operands to determine
which one is greater than the other.
| |
| GreaterThanOrEqual |
The greater than or equal relation operator (>=) compares its operands to determine
which one is greater than or equal to the other.
| |
| Inequality |
The inequality operator (!=) compares its operands to determine if they are not equal.
| |
| LessThan |
The less than relation operator (<) compares its operands to determine
which one is less than the other.
| |
| LessThanOrEqual |
The less than or equal relation operator (<=) compares its operands to determine
which one is less than or equal to the other.
|
Remarks
Use the PISystem.Supports method to check if the
PISystem supports the EventFrame feature.
The AFEventFrameSearch class can be used for finding event frames.
Examples
// This example demonstrates how to create an EventFrame and display its information. // Get the Database PISystems myPISystems = new PISystems(); AFDatabase myDB = myPISystems.DefaultPISystem.Databases.DefaultDatabase; // Create an EventFrame AFEventFrame myEventFrame = new AFEventFrame(myDB, "MyEventFrame*"); myEventFrame.SetStartTime("T-1w"); myEventFrame.SetEndTime(AFTime.Now); myEventFrame.Description = "This is my EventFrame"; myEventFrame.CheckIn(); // Search for EventFrames AFNamedCollectionList<AFEventFrame> list = AFEventFrame.FindEventFrames(myDB, null, AFTime.Now, 0, 200, AFEventFrameSearchMode.BackwardFromStartTime, null, null, null, null, false); // Display EventFrame Information foreach (AFEventFrame CurEventFrame in list) { Console.WriteLine("Name of EventFrame = {0}", CurEventFrame.Name); Console.WriteLine("StartTime = {0}, EndTime = {1}", CurEventFrame.StartTime, CurEventFrame.EndTime); Console.WriteLine("Description = {0}", CurEventFrame.Description); }
' This example demonstrates how to create an EventFrame and display its information. ' Get the Database Dim myPISystems As New PISystems Dim myDB As AFDatabase = myPISystems.DefaultPISystem.Databases.DefaultDatabase ' Create an EventFrame Dim myEventFrame As AFEventFrame = New AFEventFrame(myDB, "MyEventFrame*") myEventFrame.SetStartTime("T-1w") myEventFrame.SetEndTime(AFTime.Now) myEventFrame.Description = "This is my EventFrame" myEventFrame.CheckIn() ' Search for EventFrames Dim list As AFNamedCollectionList(Of AFEventFrame) = AFEventFrame.FindEventFrames(myDB, Nothing, AFTime.Now, 0, 200, AFEventFrameSearchMode.BackwardFromStartTime, Nothing, Nothing, Nothing, Nothing, False) ' Display EventFrame Information For Each CurEventFrame As AFEventFrame In list Console.WriteLine("Name of EventFrame = {0}", CurEventFrame.Name) Console.WriteLine("StartTime = {0}, EndTime = {1}", CurEventFrame.StartTime, CurEventFrame.EndTime) Console.WriteLine("Description = {0}", CurEventFrame.Description) Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.