AFElement.GetEventFrames Method (Object, Int32, Int32, AFEventFrameSearchMode, String, AFCategory, AFElementTemplate)
- Last UpdatedNov 18, 2025
- 5 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
limited to the specified count beginning at the requested start time in the specified direction.
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( Object startTime, int startIndex, int maxCount, AFEventFrameSearchMode searchMode, string nameFilter, AFCategory elemCategory, AFElementTemplate elemTemplate )
<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 ( startTime As Object, startIndex As Integer, maxCount As Integer, searchMode As AFEventFrameSearchMode, nameFilter As String, elemCategory As AFCategory, elemTemplate As AFElementTemplate ) As AFNamedCollectionList(Of AFEventFrame) Dim instance As AFElement Dim startTime As Object Dim startIndex As Integer Dim maxCount As Integer Dim searchMode As AFEventFrameSearchMode Dim nameFilter As String Dim elemCategory As AFCategory Dim elemTemplate As AFElementTemplate Dim returnValue As AFNamedCollectionList(Of AFEventFrame) returnValue = instance.GetEventFrames(startTime, startIndex, maxCount, searchMode, nameFilter, elemCategory, elemTemplate)
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( Object^ startTime, int startIndex, int maxCount, AFEventFrameSearchMode searchMode, String^ nameFilter, AFCategory^ elemCategory, AFElementTemplate^ elemTemplate )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("This method has been replaced by the 'AFEventFrameSearch' class using the 'Element', 'Start', 'End', 'Name', 'Category', and 'Template' filters.")>] member GetEventFrames : startTime : Object * startIndex : int * maxCount : int * searchMode : AFEventFrameSearchMode * nameFilter : string * elemCategory : AFCategory * elemTemplate : AFElementTemplate -> AFNamedCollectionList<AFEventFrame>
Parameters
- startTime
- Type: SystemObject
An object representing the starting time for the event frames to be returned. 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. - startIndex
- Type: SystemInt32
The starting index (zero based) of the items to be returned. - maxCount
- Type: SystemInt32
The maximum number of event frames to be returned. - searchMode
- Type: OSIsoft.AF.EventFrameAFEventFrameSearchMode
Indicates the direction in time from the StartTime or EndTime to proceed when returning event frames. - 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.
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.
This method will return all event frames from the specified start time up to the specified
maximum count that reference this element.
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