AFElement.GetParents Method (AFReferenceType, AFSortField, AFSortOrder, Int32)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Retrieves a non-paged collection of AFElement objects that reference this element
using the specified AFReferenceType.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFNamedCollectionList<AFElement> GetParents( AFReferenceType refType, AFSortField sortField, AFSortOrder sortOrder, int maxCount )
Public Function GetParents ( refType As AFReferenceType, sortField As AFSortField, sortOrder As AFSortOrder, maxCount As Integer ) As AFNamedCollectionList(Of AFElement) Dim instance As AFElement Dim refType As AFReferenceType Dim sortField As AFSortField Dim sortOrder As AFSortOrder Dim maxCount As Integer Dim returnValue As AFNamedCollectionList(Of AFElement) returnValue = instance.GetParents(refType, sortField, sortOrder, maxCount)
public: AFNamedCollectionList<AFElement^>^ GetParents( AFReferenceType^ refType, AFSortField sortField, AFSortOrder sortOrder, int maxCount )
member GetParents : refType : AFReferenceType * sortField : AFSortField * sortOrder : AFSortOrder * maxCount : int -> AFNamedCollectionList<AFElement>
Parameters
- refType
- Type: OSIsoft.AF.AssetAFReferenceType
The AFReferenceType used when determining if a returned AFElement references this element. - 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 reference this element using the specified AFReferenceType.
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.