AFEventFrame.FindEventFramesByAnalysis Method (AFAnalysis, Object, Int32, Int32, AFEventFrameSearchMode, String, String, AFCategory, AFElementTemplate, Boolean)
- Last UpdatedNov 18, 2025
- 5 minute read
- PI System
- AF SDK 2024 R2
- Developer
Note: This API is now 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.
Namespace: OSIsoft.AF.EventFrame
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 'Analysis', 'Start', 'Name', 'ElementName', 'Category', and 'Template' filters.")] public static AFNamedCollectionList<AFEventFrame> FindEventFramesByAnalysis( AFAnalysis analysis, Object startTime, int startIndex, int maxCount, AFEventFrameSearchMode searchMode, string nameFilter, string referencedElementNameFilter, AFCategory elemCategory, AFElementTemplate elemTemplate, bool searchFullHierarchy )
<BrowsableAttribute(false)> <ObsoleteAttribute("This method has been replaced by the 'AFEventFrameSearch' class using the 'Analysis', 'Start', 'Name', 'ElementName', 'Category', and 'Template' filters.")> Public Shared Function FindEventFramesByAnalysis ( analysis As AFAnalysis, startTime As Object, startIndex As Integer, maxCount As Integer, searchMode As AFEventFrameSearchMode, nameFilter As String, referencedElementNameFilter As String, elemCategory As AFCategory, elemTemplate As AFElementTemplate, searchFullHierarchy As Boolean ) As AFNamedCollectionList(Of AFEventFrame) Dim analysis As AFAnalysis Dim startTime As Object Dim startIndex As Integer Dim maxCount As Integer Dim searchMode As AFEventFrameSearchMode Dim nameFilter As String Dim referencedElementNameFilter As String Dim elemCategory As AFCategory Dim elemTemplate As AFElementTemplate Dim searchFullHierarchy As Boolean Dim returnValue As AFNamedCollectionList(Of AFEventFrame) returnValue = AFEventFrame.FindEventFramesByAnalysis(analysis, startTime, startIndex, maxCount, searchMode, nameFilter, referencedElementNameFilter, elemCategory, elemTemplate, searchFullHierarchy)
public: [BrowsableAttribute(false)] [ObsoleteAttribute(L"This method has been replaced by the 'AFEventFrameSearch' class using the 'Analysis', 'Start', 'Name', 'ElementName', 'Category', and 'Template' filters.")] static AFNamedCollectionList<AFEventFrame^>^ FindEventFramesByAnalysis( AFAnalysis^ analysis, Object^ startTime, int startIndex, int maxCount, AFEventFrameSearchMode searchMode, String^ nameFilter, String^ referencedElementNameFilter, AFCategory^ elemCategory, AFElementTemplate^ elemTemplate, bool searchFullHierarchy )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("This method has been replaced by the 'AFEventFrameSearch' class using the 'Analysis', 'Start', 'Name', 'ElementName', 'Category', and 'Template' filters.")>] static member FindEventFramesByAnalysis : analysis : AFAnalysis * startTime : Object * startIndex : int * maxCount : int * searchMode : AFEventFrameSearchMode * nameFilter : string * referencedElementNameFilter : string * elemCategory : AFCategory * elemTemplate : AFElementTemplate * searchFullHierarchy : bool -> AFNamedCollectionList<AFEventFrame>
Parameters
- analysis
- Type: OSIsoft.AF.AnalysisAFAnalysis
The AFAnalysis that created the requested AFEventFrame objects. - startTime
- Type: SystemObject
An object representing the starting time to begin the search. The search may compare against either the StartTime or EndTime of the event frame based on the searchMode parameter. 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
If not an empty string, only event frames which match the supplied filter on their name property will be returned. - referencedElementNameFilter
- Type: SystemString
The name filter string of an AFElement in the event frame's ReferencedElements collection. Uses same filtering rules as specified for the nameFilter parameter. To obtain an exact match to a specific element, specify the element's ID using a format that includes the opening and closing braces, such as ID.ToString("B"). - 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. - searchFullHierarchy
- Type: SystemBoolean
Specifies if the search should include objects nested further than the immediate children of the searchRoot.
Return Value
Type: AFNamedCollectionListAFEventFrameReturns a collection containing the specified page of AFEventFrame objects which were created by the specified AFAnalysis.
Remarks
An event frame must be saved to the server using ApplyChanges or CheckIn before it will be returned by this find method. This method will return a list of event frames within a time range that were created by an AFAnalysis.
This will only return objects of type AFEventFrame. Types of event frames that inherit from AFEventFrame will not be returned. Use the specific find methods to return types of event frames that inherit from AFEventFrame.
| Consider using the new AFEventFrameSearch class for finding event frames instead of using this method. |
Version Information
AFSDK
Supported in: 2.8.5, 2.8, 2.7.5, 2.7, 2.6Obsolete (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