AFElement.GetEventFrames Method (AFSearchMode, Object, Object, String, AFCategory, AFElementTemplate, AFSortField, AFSortOrder, Int32, Int32)
- Last UpdatedNov 18, 2025
- 6 minute read
- PI System
- AF SDK 2024 R2
- Developer
Note: This API is now obsolete.
Retrieves a paged collection of AFEventFrame objects that reference this element
within the specified time range.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[BrowsableAttribute(false)] [ObsoleteAttribute("This method has been replaced by the 'AFEventFrameSearch' class using the 'Element', 'Start', 'End', 'Name', 'Category', and 'Template' filters.")] public AFNamedCollectionList<AFEventFrame> GetEventFrames( AFSearchMode searchMode, Object startTime, Object endTime, string nameFilter, AFCategory elemCategory, AFElementTemplate elemTemplate, AFSortField sortField, AFSortOrder sortOrder, int startIndex, int maxCount )
<BrowsableAttribute(false)> <ObsoleteAttribute("This method has been replaced by the 'AFEventFrameSearch' class using the 'Element', 'Start', 'End', 'Name', 'Category', and 'Template' filters.")> Public Function GetEventFrames ( searchMode As AFSearchMode, startTime As Object, endTime As Object, nameFilter As String, elemCategory As AFCategory, elemTemplate As AFElementTemplate, sortField As AFSortField, sortOrder As AFSortOrder, startIndex As Integer, maxCount As Integer ) As AFNamedCollectionList(Of AFEventFrame) Dim instance As AFElement Dim searchMode As AFSearchMode Dim startTime As Object Dim endTime As Object Dim nameFilter As String Dim elemCategory As AFCategory Dim elemTemplate As AFElementTemplate Dim sortField As AFSortField Dim sortOrder As AFSortOrder Dim startIndex As Integer Dim maxCount As Integer Dim returnValue As AFNamedCollectionList(Of AFEventFrame) returnValue = instance.GetEventFrames(searchMode, startTime, endTime, nameFilter, elemCategory, elemTemplate, sortField, sortOrder, startIndex, maxCount)
public: [BrowsableAttribute(false)] [ObsoleteAttribute(L"This method has been replaced by the 'AFEventFrameSearch' class using the 'Element', 'Start', 'End', 'Name', 'Category', and 'Template' filters.")] AFNamedCollectionList<AFEventFrame^>^ GetEventFrames( AFSearchMode searchMode, Object^ startTime, Object^ endTime, String^ nameFilter, AFCategory^ elemCategory, AFElementTemplate^ elemTemplate, AFSortField sortField, AFSortOrder sortOrder, int startIndex, int maxCount )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("This method has been replaced by the 'AFEventFrameSearch' class using the 'Element', 'Start', 'End', 'Name', 'Category', and 'Template' filters.")>] member GetEventFrames : searchMode : AFSearchMode * startTime : Object * endTime : Object * nameFilter : string * elemCategory : AFCategory * elemTemplate : AFElementTemplate * sortField : AFSortField * sortOrder : AFSortOrder * startIndex : int * maxCount : int -> AFNamedCollectionList<AFEventFrame>
Parameters
- searchMode
- Type: OSIsoft.AF.AssetAFSearchMode
Determines how the startTime and endTime parameters are treated when searching for event frames to be included in the returned collection. - startTime
- Type: SystemObject
An object representing the earliest starting time for the event frames to be returned. The startTime must be less than or equal to the endTime. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate. - endTime
- Type: SystemObject
An object representing the latest ending time for the event frames to be returned. The endTime must be greater than or equal to the startTime. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate. - nameFilter
- Type: SystemString
The event frame name filter string used for finding objects.The query string (or match pattern) can include regular characters and wildcard characters. Regular characters must match exactly the characters specified in the query string. Wildcard characters can be matched with arbitrary fragments of the query string. Wildcard characters can be escaped using the single backslash (\) character. Use a double backslash (\\) to match a single backslash. The syntax of the query string has the following rules:
- If or empty string, then everything will be matched.
- If no wildcards, then an exact match on the query string is performed.
- Wildcard * can be placed anywhere in the query string and matches zero or more characters.
- Wildcard ? can be placed anywhere in the query string and matches exactly one character.
- One character in a set of characters are matched by placing them within [ ]. For example, a[bc] would match 'ab' or 'ac', but it would not match 'ad' or 'abd'.
- One character in a set of characters are not matched by placing them within [! ]. For example, a[!bc] would match 'ad', but it would not match 'ab', 'ac', or 'abd'.
- A character in a range of characters from first to last are matched using the following syntax: [first - last]. For example, a[a-c] would match 'aa', 'ab', or 'ac', but it would not match 'ad' or 'abc'.
- elemCategory
- Type: OSIsoft.AFAFCategory
Specify that returned event frames must have this category. To not filter by element category, then specify for this parameter. - elemTemplate
- Type: OSIsoft.AF.AssetAFElementTemplate
Specify that returned event frames must have this template or a template derived from this template. To not filter by element template, then specify for this parameter. - sortField
- Type: OSIsoft.AFAFSortField
The field or property of the object used to sort the returned collection. This value should not be changed between calls when attempting to get the next page of items. - sortOrder
- Type: OSIsoft.AFAFSortOrder
The order that the returned collection is sorted. This value should not be changed between calls when attempting to get the next page of items. - startIndex
- Type: SystemInt32
The starting index (zero based) of the items to be returned. - maxCount
- Type: SystemInt32
The maximum number of objects to be returned per call (the page size).
Return Value
Type: AFNamedCollectionListAFEventFrameReturns a collection containing the specified page of AFEventFrame objects which reference this element within the specified time range.
Remarks
An event frame must be saved to the server using ApplyChanges or
CheckIn before it will be returned by this method.
Version Information
AFSDK
Supported in: 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4Obsolete (compiler warning) in 3.1.1
Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5
Obsolete (compiler warning) in 2.10.0
Obsolete (compiler warning) in 2.10
Obsolete (compiler warning) in 2.9.5
Obsolete (compiler warning) in 2.9