PartUtilsGetAssociatedParts(Document, ElementId, Boolean, Boolean) Method |
Returns all Parts that are associated with the given element.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static ICollection<ElementId> GetAssociatedParts(
Document hostDocument,
ElementId elementId,
bool includePartsWithAssociatedParts,
bool includeAllChildren
)
Public Shared Function GetAssociatedParts (
hostDocument As Document,
elementId As ElementId,
includePartsWithAssociatedParts As Boolean,
includeAllChildren As Boolean
) As ICollection(Of ElementId)
public:
static ICollection<ElementId^>^ GetAssociatedParts(
Document^ hostDocument,
ElementId^ elementId,
bool includePartsWithAssociatedParts,
bool includeAllChildren
)
static member GetAssociatedParts :
hostDocument : Document *
elementId : ElementId *
includePartsWithAssociatedParts : bool *
includeAllChildren : bool -> ICollection<ElementId>
Parameters
- 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
ICollectionElementId
Parts that are associated to the element.
Exceptions
See Also