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

AF SDK Reference

AFCase.GetConnectedElements Method (AFBaseElement, AFPortType)

AFCase.GetConnectedElements Method (AFBaseElement, AFPortType)

  • Last UpdatedJan 12, 2026
  • 2 minute read
AFCase.GetConnectedElements Method (AFBaseElement, AFPortType)
This method returns a collection of AFBaseElement objects which are connected to the specified element (or child element) through a port of the specified type within the case.

Namespace:  OSIsoft.AF.Analysis
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.2.0.7

Syntax

public AFNamedCollectionList<AFBaseElement> GetConnectedElements(
	AFBaseElement element,
	AFPortType portType
)
Public Function GetConnectedElements ( 
	element As AFBaseElement,
	portType As AFPortType
) As AFNamedCollectionList(Of AFBaseElement)

Dim instance As AFCase
Dim element As AFBaseElement
Dim portType As AFPortType
Dim returnValue As AFNamedCollectionList(Of AFBaseElement)

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

Parameters

element
Type: OSIsoft.AF.AssetAFBaseElement
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: AFNamedCollectionListAFBaseElement
Returns the collection of connected elements.

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(AFBaseElement) method. The specified element must be active for the case.

Version Information

AFSDK


See Also

In This Topic