Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFModel.GetConnections Method (AFElement, String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFModel.GetConnections Method (AFElement, String)
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 model.

Namespace:  OSIsoft.AF.Modeling
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public AFCollectionList<AFConnection> GetConnections(
	AFElement element,
	string portName
)
Public Function GetConnections ( 
	element As AFElement,
	portName As String
) As AFCollectionList(Of AFConnection)

Dim instance As AFModel
Dim element As AFElement
Dim portName As String
Dim returnValue As AFCollectionList(Of AFConnection)

returnValue = instance.GetConnections(element, 
	portName)
public:
AFCollectionList<AFConnection^>^ GetConnections(
	AFElement^ element, 
	String^ portName
)
member GetConnections : 
        element : AFElement * 
        portName : string -> AFCollectionList<AFConnection> 

Parameters

element
Type: OSIsoft.AF.AssetAFElement
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: AFCollectionListAFConnection
Returns a collection of AFConnection objects with the specified port name representing a connection between the specified element and another element within the model.

Remarks

This is a subset of the collection returned by the Connections property and the GetConnections(AFElement) method. This method does not return connections between a child element and another element in the model.

Version Information

AFSDK


See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in