CanCreateParts Method


Indicates if it is possible to create parts from this DirectShape element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.0.0.377)
Since: 2020

Syntax

C#
public bool CanCreateParts()
Visual Basic
Public Function CanCreateParts As Boolean
Visual C++
public:
bool CanCreateParts()

Return Value

True if it is possible to create parts from this DirectShape.

Remarks

While it is generally possible to create parts from DirectShape elements, some characteristics make parts creation impossible. This property is re-evaluated every time the element's geometry is modified (via a call to SetShape or AppendShape). Invalid configurations include: DirectShape elements containing a polymesh, or an open geometry, as well as DirectShape elements not containing any solids and DirectShape elements configured as NotReferenceable (via a call to SetOptions). Finally, if a DirectShape element has DirectShapeType instances in its geometry, and one of those DirectShapeTypes has a configuration that is incompatible with parts creation, the DirectShape element will also be incompatible with parts creation.

See Also