AFModel.GetConnections Method (AFElement, AFPortType)
- 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 type representing a connection between the specified element (or
child element) and another element within the model.
Namespace: OSIsoft.AF.Modeling
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFCollectionList<AFConnection> GetConnections( AFElement element, AFPortType portType )
Public Function GetConnections ( element As AFElement, portType As AFPortType ) As AFCollectionList(Of AFConnection) Dim instance As AFModel Dim element As AFElement Dim portType As AFPortType Dim returnValue As AFCollectionList(Of AFConnection) returnValue = instance.GetConnections(element, portType)
public: AFCollectionList<AFConnection^>^ GetConnections( AFElement^ element, AFPortType portType )
member GetConnections : element : AFElement * portType : AFPortType -> AFCollectionList<AFConnection>
Parameters
- element
- Type: OSIsoft.AF.AssetAFElement
The element associated with the connections being returned. It (or one of its child elements) could be either a source or destination of the connection. Only child elements with a direct ownership through the Parent property will be checked. - portType
- Type: OSIsoft.AF.ModelingAFPortType
The port type of the desired connections to be returned.
Return Value
Type: AFCollectionListAFConnectionReturns a collection of AFConnection objects with the specified port type representing a connection between the specified element (or child element) and another element within the model.
Remarks
This is a subset of the collection returned by the Connections
property plus any connections between a child element and another element within
the model. It is also a subset of the collection returned by the
GetConnections(AFElement) method.