Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFElementTemplate.FindElementTemplates Method (PISystem, Guid[], Object)

AFElementTemplate.FindElementTemplates Method (PISystem, Guid[], Object)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFElementTemplate.FindElementTemplates Method (PISystem, Guid[], Object)
Performs a search within the PISystem to retrieve a collection of AFElementTemplate objects with the specified list of unique identifiers.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static AFNamedCollectionList<AFElementTemplate> FindElementTemplates(
	PISystem system,
	Guid[] ids,
	Object queryDate = null
)
Public Shared Function FindElementTemplates ( 
	system As PISystem,
	ids As Guid(),
	Optional queryDate As Object = Nothing
) As AFNamedCollectionList(Of AFElementTemplate)

Dim system As PISystem
Dim ids As Guid()
Dim queryDate As Object
Dim returnValue As AFNamedCollectionList(Of AFElementTemplate)

returnValue = AFElementTemplate.FindElementTemplates(system, 
	ids, queryDate)
public:
static AFNamedCollectionList<AFElementTemplate^>^ FindElementTemplates(
	PISystem^ system, 
	array<Guid>^ ids, 
	Object^ queryDate = nullptr
)
static member FindElementTemplates : 
        system : PISystem * 
        ids : Guid[] * 
        ?queryDate : Object 
(* Defaults:
        let _queryDate = defaultArg queryDate null
*)
-> AFNamedCollectionList<AFElementTemplate> 

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: AFNamedCollectionListAFElementTemplate
Returns 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 LoadElementTemplates(PISystem, Guid, Object) method should be used instead.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in