HasAssociatedParts Method (Document, ElementId)


Checks if an element has associated parts.

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

Syntax

C#
public static bool HasAssociatedParts(
	Document hostDocument,
	ElementId elementId
)
Visual Basic
Public Shared Function HasAssociatedParts ( _
	hostDocument As Document, _
	elementId As ElementId _
) As Boolean
Visual C++
public:
static bool HasAssociatedParts(
	Document^ hostDocument, 
	ElementId^ elementId
)

Parameters

hostDocument
Type: Autodesk.Revit.DBDocument
The document.
elementId
Type: Autodesk.Revit.DBElementId
The element to be checked for associated Parts

Return Value

True if the element has associated Parts.

Exceptions

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

See Also