GetAssociatedParts Method (Document, LinkElementId, Boolean, Boolean)


Part Utils Get Associated Parts(Document, Link Element Id, Boolean, Boolean) Method

Returns all Parts that are associated with the given element

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static ICollection<ElementId> GetAssociatedParts(
	Document hostDocument,
	LinkElementId hostOrLinkElementId,
	bool includePartsWithAssociatedParts,
	bool includeAllChildren
)

Parameters

hostDocument Document
The document of the element
hostOrLinkElementId LinkElementId
The element to be checked for associated Parts.
includePartsWithAssociatedParts Boolean
If true, include parts that have associated parts
includeAllChildren Boolean
If true, return all associated Parts recursively for all children If false, only return immediate children

Return Value

ICollection ElementId
Parts that are associated to the element
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
See Also