All part definitions (shapes that can be instanced)
All nodes (assemblies and instances)
OptionalremovalsLabels to remove from existing document. Can be part labels, instance labels, or assembly labels. Ignored when creating a new document.
OptionalpartUpdates to apply to existing parts in the document. Each update can change the shape, name, and/or color of a part. Ignored when creating a new document.
OptionalloadedParts imported from other documents (typically STEP-loaded).
Each entry copies a label tree from a source document into this document,
preserving sub-assembly hierarchy, names and colors. The copied root then
behaves as a regular part: instance nodes can reference it by partId and
place it multiple times with different transforms.
Whether to clear the existing document before adding new content. Only relevant when an existingDocument is provided.
true: Clear all existing shapes, then add new parts/nodes (full rebuild)false: Keep existing shapes, apply removals/updates, add new parts/nodes (incremental)
Complete assembly structure definition. Contains all parts and nodes that make up the assembly.
When updating an existing document:
removalsspecifies labels to remove (parts, instances, or subassemblies)partUpdatesspecifies updates to existing parts (shape, name, color)partsandnodesspecify new elements to addProcessing order: