AFCase.GetConnectedElements Method (AFBaseElement, String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method returns a collection of AFBaseElement objects which are
connected to the specified element and port within the case.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFNamedCollectionList<AFBaseElement> GetConnectedElements( AFBaseElement element, string portName )
Public Function GetConnectedElements ( element As AFBaseElement, portName As String ) As AFNamedCollectionList(Of AFBaseElement) Dim instance As AFCase Dim element As AFBaseElement Dim portName As String Dim returnValue As AFNamedCollectionList(Of AFBaseElement) returnValue = instance.GetConnectedElements(element, portName)
public: AFNamedCollectionList<AFBaseElement^>^ GetConnectedElements( AFBaseElement^ element, String^ portName )
member GetConnectedElements : element : AFBaseElement * portName : string -> AFNamedCollectionList<AFBaseElement>
Parameters
- element
- Type: OSIsoft.AF.AssetAFBaseElement
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: AFNamedCollectionListAFBaseElementReturns the collection of connected elements.
Remarks
This is a subset of the collection indirectly returned by the Connections
property and the GetConnectedElements(AFBaseElement)
method. This method
does not return elements connected between a child element and another element in the model.
The specified element must be active for the case.