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, AFPortType)

AFModel.GetConnectedElements Method (AFElement, AFPortType)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFModel.GetConnectedElements Method (AFElement, AFPortType)
This method returns a collection of AFElement objects which are connected to the specified element (or child element) through a port of the specified type 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,
	AFPortType portType
)
Public Function GetConnectedElements ( 
	element As AFElement,
	portType As AFPortType
) As AFNamedCollectionList(Of AFElement)

Dim instance As AFModel
Dim element As AFElement
Dim portType As AFPortType
Dim returnValue As AFNamedCollectionList(Of AFElement)

returnValue = instance.GetConnectedElements(element, 
	portType)
public:
AFNamedCollectionList<AFElement^>^ GetConnectedElements(
	AFElement^ element, 
	AFPortType portType
)
member GetConnectedElements : 
        element : AFElement * 
        portType : AFPortType -> AFNamedCollectionList<AFElement> 

Parameters

element
Type: OSIsoft.AF.AssetAFElement
The element associated with the connected elements 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 specified element (or one of its child elements) 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 element or one of its child elements through a port of the specified type within the model.

Remarks

The returned collection contains all the elements that are connected to the specified element or one of its child elements through a port of the specified type within the model. This is a subset of the collection returned by the GetConnectedElements(AFElement) method.

Version Information

AFSDK


See Also

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