CanCreateParts Method


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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
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 DirectShapeType.

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 DirectShapeType's geometry is modified (via a call to SetShape or AppendShape). Invalid configurations include: DirectShapeTypes containing a polymesh, or an open geometry, as well as DirectShapeTypes not containing any solids and DirectShapeTypes configured as NotReferenceable (via a call to SetOptions). Finally, if a DirectShapeType has other DirectShapeType instances in its geometry, and one of those other DirectShapeTypes has a configuration that is incompatible with parts creation, the host DirectShapeType will also be incompatible with parts creation.

See Also