AFElement.LoadElementReferences Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFNamedCollectionList<AFElement> LoadElementReferences( IList<AFElement> elements )
Public Shared Function LoadElementReferences ( elements As IList(Of AFElement) ) As AFNamedCollectionList(Of AFElement) Dim elements As IList(Of AFElement) Dim returnValue As AFNamedCollectionList(Of AFElement) returnValue = AFElement.LoadElementReferences(elements)
public: static AFNamedCollectionList<AFElement^>^ LoadElementReferences( IList<AFElement^>^ elements )
static member LoadElementReferences : elements : IList<AFElement> -> AFNamedCollectionList<AFElement>
Parameters
- elements
- Type: System.Collections.GenericIListAFElement
The list of parent elements to have their referenced elements loaded. If , then this method does nothing. All elements in the list must be from the same PISystem and have the same QueryDate.
Return Value
Type: AFNamedCollectionListAFElementA list of the referenced AFElement objects.
Remarks
The AFElement objects that are referenced by the elements in the specified list are loaded. This can improve the performance of navigating an element hierarchy by loading all the sub-elements in a single call to the server instead of making a call to the server for each of the specified elements.
The returned list of referenced elements can be used again with this method to load another level of the hierarchy. It can also be used with one of the LoadElements Overload methods to make sure the referenced elements are fully loaded or with the LoadAttributes method to only load specific attributes of the referenced elements.