AFCase.GetConnections Method (AFBaseElement, String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method returns a collection of AFConnection objects with the
specified port name representing a connection between the specified element and
another element within the case.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFCollectionList<AFConnection> GetConnections( AFBaseElement element, string portName )
Public Function GetConnections ( element As AFBaseElement, portName As String ) As AFCollectionList(Of AFConnection) Dim instance As AFCase Dim element As AFBaseElement Dim portName As String Dim returnValue As AFCollectionList(Of AFConnection) returnValue = instance.GetConnections(element, portName)
public: AFCollectionList<AFConnection^>^ GetConnections( AFBaseElement^ element, String^ portName )
member GetConnections : element : AFBaseElement * portName : string -> AFCollectionList<AFConnection>
Parameters
- element
- Type: OSIsoft.AF.AssetAFBaseElement
The element associated with the connections being returned. It could be either a source or destination of the connection. - portName
- Type: SystemString
The port name of the desired connections to be returned.
Return Value
Type: AFCollectionListAFConnectionReturns the collection of connections between the elements.
Remarks
This is a subset of the collection returned by the Connections
property and the GetConnections(AFBaseElement)
method. This method does not return connections between a child element and
another element in the case. The specified element must be active for the case.