GetAssociatedElementIds Method


Returns ids of the elements which are in association with the element with the given ElementId.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2024

Syntax

C#
public ISet<ElementId> GetAssociatedElementIds(
	ElementId elementId
)
Visual Basic
Public Function GetAssociatedElementIds ( _
	elementId As ElementId _
) As ISet(Of ElementId)
Visual C++
public:
ISet<ElementId^>^ GetAssociatedElementIds(
	ElementId^ elementId
)

Parameters

elementId
Type: Autodesk.Revit.DBElementId
Element id for which we want to get the associated elements.

Return Value

Ids of the associated elements.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also