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

AF SDK Reference

AFElement.LoadElementReferences Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFElement.LoadElementReferences Method
Loads the AFElement objects referenced by the specified elements.

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: AFNamedCollectionListAFElement
A 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.

Examples

See the example Loading Partial Element Hierarchy which illustrates using this method to load different levels of a hierarchy of elements into the client.

Version Information

AFSDK


See Also

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