CanCreateParts Method


Direct Shape Type Can Create Parts Method

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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public bool CanCreateParts()

Return Value

Boolean
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
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →