RVTDocs.com
Namespace: Autodesk.Revit.DB Class: PartUtils

PartUtils.GetAssociatedParts(Document, ElementId, Boolean, Boolean)

Method
Description:
Returns all Parts that are associated with the given element.
Syntax
public static ICollection<ElementId> GetAssociatedParts(
	Document hostDocument,
	ElementId elementId,
	bool includePartsWithAssociatedParts,
	bool includeAllChildren
)
Parameters
Parameter Type Description
hostDocument Document The document of the element.
elementId ElementId 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
Type Description
ICollection Parts that are associated to the element.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null