AFModel.GetConnectedElements Method (AFElement, String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method returns a collection of AFElement objects which are
connected to the specified element and port within the model.
Namespace: OSIsoft.AF.Modeling
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFNamedCollectionList<AFElement> GetConnectedElements( AFElement element, string portName )
Public Function GetConnectedElements ( element As AFElement, portName As String ) As AFNamedCollectionList(Of AFElement) Dim instance As AFModel Dim element As AFElement Dim portName As String Dim returnValue As AFNamedCollectionList(Of AFElement) returnValue = instance.GetConnectedElements(element, portName)
public: AFNamedCollectionList<AFElement^>^ GetConnectedElements( AFElement^ element, String^ portName )
member GetConnectedElements : element : AFElement * portName : string -> AFNamedCollectionList<AFElement>
Parameters
- element
- Type: OSIsoft.AF.AssetAFElement
The element associated with the connected elements being returned. It could be either a source or destination of the connection. - portName
- Type: SystemString
The port name of the specified element to which the desired elements are connected through.
Return Value
Type: AFNamedCollectionListAFElementReturns a collection contains all the elements that are connected to the specified connected to the specified element and port within the model.
Remarks
This is a subset of the collection indirectly returned by the Connections
property and the GetConnectedElements(AFElement)
method. This method
does not return connections between a child element and another element in the model.