AFElement.GetElements Method (AFSortField, AFSortOrder, Int32)
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Note: This API is now obsolete.
Retrieves a non-paged collection of child AFElement objects that have been added
to this element.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[BrowsableAttribute(false)] [ObsoleteAttribute("This method has been replaced by the 'AFElementSearch' class using the 'Root' filter.")] public AFNamedCollectionList<AFElement> GetElements( AFSortField sortField, AFSortOrder sortOrder, int maxCount )
<BrowsableAttribute(false)> <ObsoleteAttribute("This method has been replaced by the 'AFElementSearch' class using the 'Root' filter.")> Public Function GetElements ( sortField As AFSortField, sortOrder As AFSortOrder, maxCount As Integer ) As AFNamedCollectionList(Of AFElement) Dim instance As AFElement Dim sortField As AFSortField Dim sortOrder As AFSortOrder Dim maxCount As Integer Dim returnValue As AFNamedCollectionList(Of AFElement) returnValue = instance.GetElements(sortField, sortOrder, maxCount)
public: [BrowsableAttribute(false)] [ObsoleteAttribute(L"This method has been replaced by the 'AFElementSearch' class using the 'Root' filter.")] AFNamedCollectionList<AFElement^>^ GetElements( AFSortField sortField, AFSortOrder sortOrder, int maxCount )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("This method has been replaced by the 'AFElementSearch' class using the 'Root' filter.")>] member GetElements : sortField : AFSortField * sortOrder : AFSortOrder * maxCount : int -> AFNamedCollectionList<AFElement>
Parameters
- sortField
- Type: OSIsoft.AFAFSortField
The field or property of the object used to sort the returned collection. - sortOrder
- Type: OSIsoft.AFAFSortOrder
The order that the returned collection is sorted. - maxCount
- Type: SystemInt32
The maximum number of objects to be returned.
Return Value
Type: AFNamedCollectionListAFElementReturns a collection containing the first page of AFElement objects which are child elements of the current element.
Remarks
If a QueryDate is defined for the current element, then that query date will be used
to determine the collection of elements that are returned from this method.
Version Information
AFSDK
Obsolete (compiler warning) in 3.1.1Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5
Obsolete (compiler warning) in 2.10.0
Obsolete (compiler warning) in 2.10
Obsolete (compiler warning) in 2.9.5
Obsolete (compiler warning) in 2.9
Obsolete (compiler warning) in 2.8.5
Obsolete (compiler warning) in 2.8
Obsolete (compiler warning) in 2.7.5
Obsolete (compiler warning) in 2.7
Obsolete (compiler warning) in 2.6
Obsolete (compiler warning) in 2.5
Obsolete (compiler warning) in 2.4