AFCase.FindCases Method (PISystem, Guid[], Object)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Performs a search within the PISystem to retrieve a collection
of AFCase objects with the specified list of unique identifiers.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFNamedCollectionList<AFCase> FindCases( PISystem system, Guid[] ids, Object queryDate = null )
Public Shared Function FindCases ( system As PISystem, ids As Guid(), Optional queryDate As Object = Nothing ) As AFNamedCollectionList(Of AFCase) Dim system As PISystem Dim ids As Guid() Dim queryDate As Object Dim returnValue As AFNamedCollectionList(Of AFCase) returnValue = AFCase.FindCases(system, ids, queryDate)
public: static AFNamedCollectionList<AFCase^>^ FindCases( PISystem^ system, array<Guid>^ ids, Object^ queryDate = nullptr )
static member FindCases : system : PISystem * ids : Guid[] * ?queryDate : Object (* Defaults: let _queryDate = defaultArg queryDate null *) -> AFNamedCollectionList<AFCase>
Parameters
- system
- Type: OSIsoft.AFPISystem
The PISystem to search for the desired objects. - ids
- Type: SystemGuid
An array of the unique identifiers of the objects to load. - queryDate (Optional)
- Type: SystemObject
The query date used to load the objects. Specify or AFTime.MaxValue for most recent versions of the objects. 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 AFTime.Now.
Return Value
Type: AFNamedCollectionListAFCaseReturns a collection of the objects in the system which match the unique identifiers in the ids list at the specified queryDate. If no object can be found for a unique identifier in the list, there will be no corresponding entry in the returned collection. The order of items in the returned collection might not match the order of specified ids, but the returned collection items can be accessed by ID.
Remarks
This method will search for matching objects at the specified queryDate based upon its ID and load its header from the server if not already loaded in the SDK. If you need a fully loaded object, then the LoadCases(PISystem, Guid, Object) method should be used instead.