AFEventFrame.FindEventFramesByExtendedProperty Method (AFDatabase, String, IEnumerable(String), Int32)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Retrieves a list of AFEventFrame objects that have the specified extended property
string values defined for the event frame.
Namespace: OSIsoft.AF.EventFrame
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static IList<KeyValuePair<string, AFEventFrame>> FindEventFramesByExtendedProperty( AFDatabase database, string propertyName, IEnumerable<string> values, int maxCount )
Public Shared Function FindEventFramesByExtendedProperty ( database As AFDatabase, propertyName As String, values As IEnumerable(Of String), maxCount As Integer ) As IList(Of KeyValuePair(Of String, AFEventFrame)) Dim database As AFDatabase Dim propertyName As String Dim values As IEnumerable(Of String) Dim maxCount As Integer Dim returnValue As IList(Of KeyValuePair(Of String, AFEventFrame)) returnValue = AFEventFrame.FindEventFramesByExtendedProperty(database, propertyName, values, maxCount)
public: static IList<KeyValuePair<String^, AFEventFrame^>>^ FindEventFramesByExtendedProperty( AFDatabase^ database, String^ propertyName, IEnumerable<String^>^ values, int maxCount )
static member FindEventFramesByExtendedProperty : database : AFDatabase * propertyName : string * values : IEnumerable<string> * maxCount : int -> IList<KeyValuePair<string, AFEventFrame>>
Parameters
- database
- Type: OSIsoft.AFAFDatabase
The AFDatabase to search for the requested event frames. - propertyName
- Type: SystemString
The name of the extended property to be searched. - values
- Type: System.Collections.GenericIEnumerableString
The list of extended property values to match for the specified propertyName. - maxCount
- Type: SystemInt32
The maximum number of event frames to be returned from the search.
Return Value
Type: IListKeyValuePairString, AFEventFrameReturns a list of KeyValuePairTKey, TValue items where the key is the value of the extended property and the value is the AFEventFrame that matched the search for that key value. This allows the returned event frame to be matched with the specified extended property value without needing to load the full object from the server.
Remarks
This method will find the event frames that have an extended property with the specified propertyName and its value set to one of the values in the list of specified values. All extended property values of type String and Guid on an AFEventFrame are automatically indexed in the server to speed up the search on these types of property values. These are the only type of property values that can be searched.
| Only event frames that have been saved to the server will be returned by this search. This search is only supported on PI AF Server 2.6 or later. |
| Consider using the new AFEventFrameSearch class for finding event frames instead of using this method. |