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

AF SDK Reference

AFModel.GetConnectedElements Method (AFElement, String)

AFModel.GetConnectedElements Method (AFElement, String)

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

Version Information

AFSDK


See Also

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