Appearance
Design
Author, query & edit BIM geometry. Accessed via snaptrude.design.
Most functionality lives in the sub-namespaces below. The lock-state verbs (lock / unlock / isLocked / listLocked) and the area-lock verbs (lockArea / unlockArea / isAreaLocked / listAreaLocked) are top-level design methods.
Sub-namespaces
| Namespace | Page | Description |
|---|---|---|
design.create | Design Create | Author new scene-committed BIM entities |
design.query | Design Query | Read-only enumeration and inspection of scene entities and their geometry |
design.selection | Design Selection | Read and mutate the current scene selection |
design.transform | Transform | Rigid transforms — move / rotate scene entities |
design.update | Design Update | Edit existing scene entities — properties and geometry |
design.edit | Design Edit | Non-create geometry edits (offset / split a top profile) |
design.doors | Doors | Door-specific reads and edits |
design.windows | Windows | Window-specific reads and dimension mutations |
design.furniture | Furniture | Placeable furniture catalog reads (library items, not scene entities) |
design.materials | Materials | Project material library + material assignment |
design.erase | Erase | Plan-level adjacency-edge erase (NOT hard delete) |
design.delete | Design Delete | Hard entity removal |
design.boolean | Boolean Operations | CSG boolean ops (union / subtract / intersect) |
Types
PluginDesignChangeResult
Shared result for scene-state change mutations (lock/unlock, selection, visibility) — echoes the handles actually affected (post-cascade for lock). Errors throw (the RPC call rejects); there is no Result<> wrapper in the SDK.
| Property | Type | Description |
|---|---|---|
affected | ComponentHandle[] | The entities actually affected by the mutation |
PluginDesignLockArgs
Wire-schema for lock arguments.
| Property | Type | Description |
|---|---|---|
components | ComponentHandle[] | Entities to lock |
PluginDesignUnlockArgs
Wire-schema for unlock arguments. Same shape as PluginDesignLockArgs.
| Property | Type | Description |
|---|---|---|
components | ComponentHandle[] | Entities to unlock |
PluginDesignIsLockedArgs
Wire-schema for isLocked arguments.
| Property | Type | Description |
|---|---|---|
component | ComponentHandle | The entity to test |
includeInherited | boolean (optional, default true) | Fold group + bucket lock; false reads the own flag only |
BooleanOutcome
Result of a CSG boolean op (design.boolean.union / subtract / intersect) — see Boolean Operations. created are the result masses; deleted is every consumed input (for subtract this includes BOTH the target AND the tools). Errors throw (the RPC call rejects).
| Property | Type | Description |
|---|---|---|
created | ComponentHandle[] | The result masses |
deleted | ComponentHandle[] | Every consumed input component |
Functions
lock(components)
Lock entities (blocks editing). Undoable. Cascades to void/door/window children, stacked-wall companions, and terrain neighborhood; skips active-group members.
- Parameters:
components:ComponentHandle[]— Entities to lock
- Returns:
PluginDesignChangeResult— The affected entities (post-cascade)
ts
// Lock a wall, check its state, then release everything the lock touched
const walls = await snaptrude.design.query.listWalls();
const { affected } = await snaptrude.design.lock([walls[0]]);
const locked = await snaptrude.design.isLocked(walls[0]); // true
await snaptrude.design.unlock(affected);unlock(components)
Unlock entities. Undoable. Paired with lock.
- Parameters:
components:ComponentHandle[]— Entities to unlock
- Returns:
PluginDesignChangeResult— The affected entities
isLocked(component, includeInherited?)
Test whether an entity is locked (folds group + bucket lock unless includeInherited: false).
- Parameters:
component:ComponentHandle— The entity to testincludeInherited:boolean(optional, defaulttrue) — Fold group + bucket lock;falsereads the own flag only
- Returns:
boolean—trueif locked, otherwisefalse
listLocked()
List the explicitly-locked entities (excludes purely group/bucket-inherited locks).
- Returns:
ComponentHandle[]— The locked entities
ts
const locked = await snaptrude.design.listLocked();lockArea(spaces)
Lock the footprint area of Room/Department mass spaces (distinct from lock, which freezes the whole object). Cascades to instances + source; undoable. Split-gated behind the area_lock treatment — writes throw "Area lock is not enabled" when the treatment is off.
- Parameters:
spaces:ComponentHandle[]— Area-lockable spaces (Room/Department masses)
- Returns:
PluginDesignChangeResult— The affected spaces - Throws: when the treatment is off, or any handle is not an area-lockable space
ts
const [space] = await snaptrude.design.query.listMasses();
await snaptrude.design.lockArea([space]);unlockArea(spaces)
Unlock the footprint area of previously area-locked spaces. Paired with lockArea.
- Parameters:
spaces:ComponentHandle[]— Spaces to area-unlock
- Returns:
PluginDesignChangeResult— The affected spaces
isAreaLocked(space)
Test whether a space's footprint area is locked. Read — never throws (returns false for a non-space or when the treatment is off).
- Parameters:
space:ComponentHandle— The space to test
- Returns:
boolean
listAreaLocked()
List the spaces whose footprint area is locked. Read — returns [] when the treatment is off.
- Returns:
ComponentHandle[]— The area-locked spaces