Revit 2025.3 API
Direct |
Indicates if it is possible to create parts from this DirectShapeType element.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public bool CanCreateParts()
Public Function CanCreateParts As Boolean
public: bool CanCreateParts()
member CanCreateParts : unit -> bool
Return Value
BooleanTrue if it is possible to create parts from this DirectShapeType.

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