@snaptrude/plugin-core 0.9.10 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/api-manifest.json +77 -415
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +109 -1
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +4 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +29 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +74 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/index.cjs +2163 -1968
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2143 -1973
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +131 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +5 -0
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +27 -0
- package/src/api/design/update/index.ts +53 -0
package/api-manifest.json
CHANGED
|
@@ -3403,8 +3403,7 @@
|
|
|
3403
3403
|
"examplePrompts": [
|
|
3404
3404
|
"Switch to present mode",
|
|
3405
3405
|
"Open BIM mode",
|
|
3406
|
-
"Go back to design mode"
|
|
3407
|
-
"Open program mode\n\n# Example\n```ts\nawait snaptrude.core.mode.set(\"present\")\n// ... presentation work ...\nawait snaptrude.core.mode.set(\"design\")\n```"
|
|
3406
|
+
"Go back to design mode\n\n# Example\n```ts\nawait snaptrude.core.mode.set(\"present\")\n// ... presentation work ...\nawait snaptrude.core.mode.set(\"design\")\n```"
|
|
3408
3407
|
],
|
|
3409
3408
|
"argsType": "PluginAppMode",
|
|
3410
3409
|
"resultType": "PluginCoreModeSetResult"
|
|
@@ -4039,19 +4038,6 @@
|
|
|
4039
4038
|
"argsType": "ComponentHandle",
|
|
4040
4039
|
"resultType": "PluginCoreTagsGetTagsForComponentResult"
|
|
4041
4040
|
},
|
|
4042
|
-
{
|
|
4043
|
-
"path": "core.tags.listForComponents",
|
|
4044
|
-
"namespace": "core.tags",
|
|
4045
|
-
"summary": "List the tags carried by many components in one call.",
|
|
4046
|
-
"examplePrompts": [
|
|
4047
|
-
"Get the tags of every space with their colors",
|
|
4048
|
-
"List the tags on all rooms so I can color them by Occupancy",
|
|
4049
|
-
"Which tag does each selected space carry?\n\n# Example\n```ts\nconst { components } = await snaptrude.core.tags.listForComponents()\nfor (const c of components) {\nconst occupancy = c.tags.find((t) => t.categoryName === \"Occupancy\")\nif (occupancy) paint(c.componentId, occupancy.color)\n}\n```"
|
|
4050
|
-
],
|
|
4051
|
-
"argsType": "ComponentHandle[]",
|
|
4052
|
-
"resultType": "PluginCoreTagsListForComponentsResult",
|
|
4053
|
-
"performance": "One round-trip for any number of components — use this instead of a `listForComponent` loop."
|
|
4054
|
-
},
|
|
4055
4041
|
{
|
|
4056
4042
|
"path": "core.tags.unassign",
|
|
4057
4043
|
"namespace": "core.tags",
|
|
@@ -4313,27 +4299,10 @@
|
|
|
4313
4299
|
"Put a door from the catalog at this point on the wall",
|
|
4314
4300
|
"Insert the entrance door into this wall",
|
|
4315
4301
|
"Add a door to the wall and call it Entry-01",
|
|
4316
|
-
"Add a door that opens into the living room",
|
|
4317
|
-
"Put a door here hinged on the north jamb\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst door = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Entry-01\" },\n)\n// …facing a specific side of the wall (pass a point inside that room):\nconst intoKitchen = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n// …and hinged on the jamb nearest a point (here the +x end of the opening):\nconst hingedRight = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ hinge: await snaptrude.core.math.vec3.new(3.5, 0, 5) },\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
4302
|
+
"Add a door that opens into the living room\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst door = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Entry-01\" },\n)\n// …facing a specific side of the wall (pass a point inside that room):\nconst intoKitchen = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
4318
4303
|
],
|
|
4319
4304
|
"argsType": "string",
|
|
4320
|
-
"resultType": "ComponentHandle"
|
|
4321
|
-
"performance": "For MORE THAN ONE door, call `design.create.doors(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-door creator is N round-trips."
|
|
4322
|
-
},
|
|
4323
|
-
{
|
|
4324
|
-
"path": "design.create.doors",
|
|
4325
|
-
"namespace": "design.create",
|
|
4326
|
-
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width` and `height` — the same fields as a `\"door\"` {@linkcode PluginDesignCreateOpeningOptions}. Validate-all-or-throw; one command.",
|
|
4327
|
-
"examplePrompts": [
|
|
4328
|
-
"Add doors to all of these walls at once",
|
|
4329
|
-
"Place a door in every room in one operation",
|
|
4330
|
-
"Bulk add the entrance doors from this schedule",
|
|
4331
|
-
"Put three doors on this wall in a single undo step",
|
|
4332
|
-
"Add all the doors for this floor plan together"
|
|
4333
|
-
],
|
|
4334
|
-
"argsType": "PluginCreateDoorItem[]",
|
|
4335
|
-
"resultType": "ComponentHandle[]",
|
|
4336
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.door` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [entry] = await snaptrude.design.doors.listCatalog() const [front, side] = await snaptrude.design.create.doors([ { catalogId: entry.id, hostWall: wall, position: await v.new(2, 0, 5), label: \"D-01\" }, { catalogId: entry.id, hostWall: wall, position: await v.new(6, 0, 5), width: 1.2 }, ]) // `wall` was re-cut twice and no longer resolves — ask the opening for its host: const currentWall = await snaptrude.design.query.getHost(front) ```"
|
|
4305
|
+
"resultType": "ComponentHandle"
|
|
4337
4306
|
},
|
|
4338
4307
|
{
|
|
4339
4308
|
"path": "design.create.floor",
|
|
@@ -4346,23 +4315,7 @@
|
|
|
4346
4315
|
"Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst floor = await snaptrude.design.create.floor(contour, 0.1)\n```"
|
|
4347
4316
|
],
|
|
4348
4317
|
"argsType": "ContourHandle",
|
|
4349
|
-
"resultType": "ComponentHandle"
|
|
4350
|
-
"performance": "For MORE THAN ONE floor, call `design.create.floors(items[])` — one host round-trip and ONE undo entry for the whole batch. Looping this single-floor creator is N round-trips and N undo entries."
|
|
4351
|
-
},
|
|
4352
|
-
{
|
|
4353
|
-
"path": "design.create.floors",
|
|
4354
|
-
"namespace": "design.create",
|
|
4355
|
-
"summary": "Create **many floors** in one undoable operation (bulk plural of {@linkcode floor}). Each item extrudes its own footprint contour (outer profile + holes) upward by its own `thickness`, at its own optional position offset. Validate-all-or-throw; one command.",
|
|
4356
|
-
"examplePrompts": [
|
|
4357
|
-
"Create floors for all these room outlines at once",
|
|
4358
|
-
"Add a floor to every space in one operation",
|
|
4359
|
-
"Bulk create the floor plates for this building",
|
|
4360
|
-
"Lay 100mm floors across these five footprints in one undo step",
|
|
4361
|
-
"Create the ground and first floor slabs together"
|
|
4362
|
-
],
|
|
4363
|
-
"argsType": "PluginCreateFloorItem[]",
|
|
4364
|
-
"resultType": "ComponentHandle[]",
|
|
4365
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.floor` in a loop: build the full `items[]` array first (all contours and offsets up front), then make one call. # Example ```ts const rect = await snaptrude.core.geom.create.profileRect(5, 4) const contour = await snaptrude.core.geom.create.contourFromProfile(rect) const [ground, upper] = await snaptrude.design.create.floors([ { contour, thickness: 0.1 }, { contour, thickness: 0.1, position: await snaptrude.core.math.vec3.new(0, 3, 0) }, ]) ```"
|
|
4318
|
+
"resultType": "ComponentHandle"
|
|
4366
4319
|
},
|
|
4367
4320
|
{
|
|
4368
4321
|
"path": "design.create.furniture",
|
|
@@ -4377,23 +4330,7 @@
|
|
|
4377
4330
|
"Place a chair here rotated 90 degrees\n\n# Example\n```ts\nconst chair = await snaptrude.design.create.furniture(\n\"6620f1a…\", // from design.furniture.listCatalog()\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Chair-01\" },\n)\n// …placed already turned 90° about the vertical axis:\nconst turned = await snaptrude.design.create.furniture(\n\"6620f1a…\",\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\n90,\n)\n```"
|
|
4378
4331
|
],
|
|
4379
4332
|
"argsType": "string",
|
|
4380
|
-
"resultType": "ComponentHandle"
|
|
4381
|
-
"performance": "For MORE THAN ONE item, call `design.create.furnitureItems(items[])` — one host round-trip and ONE undo entry, and a catalog source shared by several items is fetched once. Looping this single-item creator is N round-trips."
|
|
4382
|
-
},
|
|
4383
|
-
{
|
|
4384
|
-
"path": "design.create.furnitureItems",
|
|
4385
|
-
"namespace": "design.create",
|
|
4386
|
-
"summary": "Place **many furniture items** in one undoable operation (bulk plural of {@linkcode furniture}). Each item names a catalog id and an absolute world position (`position.y` is the REST elevation — the same grounding contract as the singular creator), with optional label and rotation. A catalog source shared by several items is fetched and recorded once for the whole batch, so the host — not the caller — owns source persistence (there is no per-item `createNewSourceMesh`). Validate-all-or-throw; one command.",
|
|
4387
|
-
"examplePrompts": [
|
|
4388
|
-
"Place all the desks for this office at once",
|
|
4389
|
-
"Furnish every bedroom in one operation",
|
|
4390
|
-
"Bulk place these chairs around the table",
|
|
4391
|
-
"Add the whole furniture layout in a single undo step",
|
|
4392
|
-
"Drop twenty copies of this chair at these positions"
|
|
4393
|
-
],
|
|
4394
|
-
"argsType": "PluginCreateFurnitureItem[]",
|
|
4395
|
-
"resultType": "ComponentHandle[]",
|
|
4396
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.furniture` in a loop: build the full `items[]` array first (all positions and angles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [chair] = await snaptrude.design.furniture.listCatalog() const placed = await snaptrude.design.create.furnitureItems([ { catalogId: chair.id, position: await v.new(3, 0, 5), label: \"Chair-01\" }, { catalogId: chair.id, position: await v.new(4, 0, 5), angleInDegrees: 90 }, { catalogId: chair.id, position: await v.new(5, 0, 5), angleInDegrees: 180 }, ]) ```"
|
|
4333
|
+
"resultType": "ComponentHandle"
|
|
4397
4334
|
},
|
|
4398
4335
|
{
|
|
4399
4336
|
"path": "design.create.mass",
|
|
@@ -4430,7 +4367,7 @@
|
|
|
4430
4367
|
],
|
|
4431
4368
|
"argsType": "PluginDesignCreateOpeningOptions",
|
|
4432
4369
|
"resultType": "ComponentHandle",
|
|
4433
|
-
"performance": "Single-opening creator — use it for one hosted opening.
|
|
4370
|
+
"performance": "Single-opening creator — use it for one hosted opening. A plural API is intentionally unavailable until host placement can be atomic. # Example ```ts const opening = await snaptrude.design.create.opening({ kind: \"window\", catalogId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
|
|
4434
4371
|
},
|
|
4435
4372
|
{
|
|
4436
4373
|
"path": "design.create.referenceLines",
|
|
@@ -4476,13 +4413,12 @@
|
|
|
4476
4413
|
{
|
|
4477
4414
|
"path": "design.create.smartLayout",
|
|
4478
4415
|
"namespace": "design.create",
|
|
4479
|
-
"summary": "Place a **smart layout** —
|
|
4416
|
+
"summary": "Place a **smart layout** — apply a saved smart-layout template from the team/user library (walls, floors, spaces, furniture, doors, windows) onto one or more target ROOM/DEPARTMENT spaces, adapting orientation and fit to each target.",
|
|
4480
4417
|
"examplePrompts": [
|
|
4481
|
-
"
|
|
4482
|
-
"
|
|
4483
|
-
"
|
|
4484
|
-
"
|
|
4485
|
-
"Use this room as a template for the rooms I selected but keep them visible\n\n# Example\n```ts\nconst [templateRoom, ...targets] = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst result = await snaptrude.design.create.smartLayout({\ntemplateComponents: [templateRoom],\ntargets,\n})\nconsole.log(\"placed walls:\", result.created.walls.length, \"skipped:\", result.skippedWalls)\n\n// …or clone a saved group by its id (from core.groups.list)\nconst { groups } = await snaptrude.core.groups.list()\nawait snaptrude.design.create.smartLayout({ templateGroup: groups[0].id, targets })\n```"
|
|
4418
|
+
"Apply this saved layout template to the selected rooms",
|
|
4419
|
+
"Place the \"Meeting Room A\" template into these two spaces",
|
|
4420
|
+
"Fill every office with my saved desk-cluster layout",
|
|
4421
|
+
"Use a template from my library to lay out this room\n\n# Example\n```ts\nconst targets = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst [template] = await snaptrude.design.smartLayouts.listCatalog()\nconst result = await snaptrude.design.create.smartLayout({\ntemplateId: template.id,\ntargets,\n})\nconsole.log(\"placed walls:\", result.created.walls.length, \"skipped:\", result.skippedWalls)\n```"
|
|
4486
4422
|
],
|
|
4487
4423
|
"argsType": "PluginSmartLayoutArgs",
|
|
4488
4424
|
"resultType": "PluginSmartLayoutResult"
|
|
@@ -4532,21 +4468,6 @@
|
|
|
4532
4468
|
"argsType": "PluginStaircasePreset",
|
|
4533
4469
|
"resultType": "ComponentHandle"
|
|
4534
4470
|
},
|
|
4535
|
-
{
|
|
4536
|
-
"path": "design.create.wallRuns",
|
|
4537
|
-
"namespace": "design.create",
|
|
4538
|
-
"summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Validate-all-or-throw; one command.",
|
|
4539
|
-
"examplePrompts": [
|
|
4540
|
-
"Draw all the walls of this floor plan at once",
|
|
4541
|
-
"Build every room's perimeter in one operation",
|
|
4542
|
-
"Bulk create wall runs from these centerlines",
|
|
4543
|
-
"Create the walls for both storeys in a single undo step",
|
|
4544
|
-
"Turn these polylines into 200mm brick walls together"
|
|
4545
|
-
],
|
|
4546
|
-
"argsType": "PluginCreateWallRunItem[]",
|
|
4547
|
-
"resultType": "ComponentHandle[][]",
|
|
4548
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.walls` in a loop: build the full `items[]` array first (all profiles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const ground = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), await v.new(8, 0, 6), ]) const upper = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), ]) const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([ { profile: ground, height: 3, thickness: 0.2 }, { profile: upper, height: 3, storey: 2 }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
|
|
4549
|
-
},
|
|
4550
4471
|
{
|
|
4551
4472
|
"path": "design.create.walls",
|
|
4552
4473
|
"namespace": "design.create",
|
|
@@ -4561,8 +4482,7 @@
|
|
|
4561
4482
|
"Build the perimeter in exposed concrete walls\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
|
|
4562
4483
|
],
|
|
4563
4484
|
"argsType": "ProfileHandle",
|
|
4564
|
-
"resultType": "ComponentHandle[]"
|
|
4565
|
-
"performance": "For MORE THAN ONE run, call `design.create.wallRuns(items[])` — one host round-trip and ONE undo entry for every run in the batch. Looping this single-run creator is N round-trips and N undo entries."
|
|
4485
|
+
"resultType": "ComponentHandle[]"
|
|
4566
4486
|
},
|
|
4567
4487
|
{
|
|
4568
4488
|
"path": "design.create.window",
|
|
@@ -4577,23 +4497,7 @@
|
|
|
4577
4497
|
"Add a casement window opening toward the garden side\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst window = await snaptrude.design.create.window(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Win-01\" },\n)\n```"
|
|
4578
4498
|
],
|
|
4579
4499
|
"argsType": "string",
|
|
4580
|
-
"resultType": "ComponentHandle"
|
|
4581
|
-
"performance": "For MORE THAN ONE window, call `design.create.windows(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-window creator is N round-trips."
|
|
4582
|
-
},
|
|
4583
|
-
{
|
|
4584
|
-
"path": "design.create.windows",
|
|
4585
|
-
"namespace": "design.create",
|
|
4586
|
-
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width`, `height` and `sillHeight` — the same fields as a `\"window\"` {@linkcode PluginDesignCreateOpeningOptions}. `sillHeight` is measured from the host wall base to the BOTTOM of the window. Validate-all-or-throw; one command.",
|
|
4587
|
-
"examplePrompts": [
|
|
4588
|
-
"Add windows along this whole facade at once",
|
|
4589
|
-
"Place a window in every bedroom in one operation",
|
|
4590
|
-
"Bulk add the windows from this schedule",
|
|
4591
|
-
"Put four windows on this wall in a single undo step",
|
|
4592
|
-
"Add all the windows with a 0.9m sill height together"
|
|
4593
|
-
],
|
|
4594
|
-
"argsType": "PluginCreateWindowItem[]",
|
|
4595
|
-
"resultType": "ComponentHandle[]",
|
|
4596
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.window` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [casement] = await snaptrude.design.windows.listCatalog() const placed = await snaptrude.design.create.windows([ { catalogId: casement.id, hostWall: wall, position: await v.new(2, 0, 5), sillHeight: 0.9 }, { catalogId: casement.id, hostWall: wall, position: await v.new(5, 0, 5), sillHeight: 0.9 }, ]) const currentWall = await snaptrude.design.query.getHost(placed[0]) ```"
|
|
4500
|
+
"resultType": "ComponentHandle"
|
|
4597
4501
|
},
|
|
4598
4502
|
{
|
|
4599
4503
|
"path": "design.delete.entities",
|
|
@@ -4610,82 +4514,6 @@
|
|
|
4610
4514
|
"resultType": "PluginDesignChangeResult",
|
|
4611
4515
|
"performance": "Array delete — pass every target in one call (one host round-trip). There is no per-item delete; collect the whole set and never loop this per entity. # Example ```ts // Hard-delete every furniture item on storey 2 (a single undo entry) const furniture = await snaptrude.design.query.listFurniture({ storeys: [2] }) if (furniture.length > 0) { const { affected } = await snaptrude.design.delete.entities(furniture) } ```"
|
|
4612
4516
|
},
|
|
4613
|
-
{
|
|
4614
|
-
"path": "design.dimensions.create",
|
|
4615
|
-
"namespace": "design.dimensions",
|
|
4616
|
-
"summary": "Draw one dimension line between two world points, anchored to a component.",
|
|
4617
|
-
"examplePrompts": [
|
|
4618
|
-
"Dimension every wall on level 2",
|
|
4619
|
-
"Add a dimension line along this wall",
|
|
4620
|
-
"Measure the width of this room and label it on the plan\n\n# Example\n```ts\nconst { design, core } = snaptrude\nconst v = core.math.vec3\nconst curve = core.geom.query.curve\nfor (const wall of await design.query.listWalls({ storeys: [2] })) {\nconst cl = await design.query.geometry.getCenterline(wall)\nif (!cl) continue\nconst a = await curve.getStartPoint(cl)\nconst b = await curve.getEndPoint(cl)\nawait design.dimensions.create(\nawait v.new(a.x, a.y, a.z),\nawait v.new(b.x, b.y, b.z),\nwall,\n)\n}\n```"
|
|
4621
|
-
],
|
|
4622
|
-
"argsType": "Vec3Handle",
|
|
4623
|
-
"resultType": "DimensionHandle"
|
|
4624
|
-
},
|
|
4625
|
-
{
|
|
4626
|
-
"path": "design.dimensions.delete",
|
|
4627
|
-
"namespace": "design.dimensions",
|
|
4628
|
-
"summary": "Delete dimension lines — the same hard removal as selecting them and pressing Delete. Undoable as a **single** entry for the whole batch.",
|
|
4629
|
-
"examplePrompts": [
|
|
4630
|
-
"Remove all dimension lines",
|
|
4631
|
-
"Delete the dimensions on this wall",
|
|
4632
|
-
"Clear the measurements I added to level 2"
|
|
4633
|
-
],
|
|
4634
|
-
"argsType": "DimensionHandle[]",
|
|
4635
|
-
"resultType": "PluginDimensionsChangeResult",
|
|
4636
|
-
"performance": "Array API — pass the whole set in one call (one host round-trip, one undo entry). Never loop this per dimension. # Example ```ts const dims = snaptrude.design.dimensions const onWall = await dims.list({ anchors: [wall] }) if (onWall.length > 0) await dims.delete(onWall.map((d) => d.id)) ```"
|
|
4637
|
-
},
|
|
4638
|
-
{
|
|
4639
|
-
"path": "design.dimensions.get",
|
|
4640
|
-
"namespace": "design.dimensions",
|
|
4641
|
-
"summary": "Read one dimension line by handle.",
|
|
4642
|
-
"examplePrompts": [
|
|
4643
|
-
"Read the dimension line I just created",
|
|
4644
|
-
"How long is this dimension and what does its label say?",
|
|
4645
|
-
"Check whether that dimension line still exists\n\n# Example\n```ts\nconst dim = await snaptrude.design.dimensions.get(handle)\nif (dim) console.log(dim.label, dim.length, dim.storey)\n```"
|
|
4646
|
-
],
|
|
4647
|
-
"argsType": "DimensionHandle",
|
|
4648
|
-
"resultType": "PluginDimensionLine | null"
|
|
4649
|
-
},
|
|
4650
|
-
{
|
|
4651
|
-
"path": "design.dimensions.hide",
|
|
4652
|
-
"namespace": "design.dimensions",
|
|
4653
|
-
"summary": "Hide dimension lines from the viewport — the same as the right-click \"Hide\" action (it sets the user Hide flag, `isHidden`). Undoable. Already-hidden dimensions are skipped and are not reported in `affected`.",
|
|
4654
|
-
"examplePrompts": [
|
|
4655
|
-
"Hide the dimensions on this storey",
|
|
4656
|
-
"Hide every dimension line while I present",
|
|
4657
|
-
"Temporarily hide the measurements on level 3"
|
|
4658
|
-
],
|
|
4659
|
-
"argsType": "DimensionHandle[]",
|
|
4660
|
-
"resultType": "PluginDimensionsChangeResult",
|
|
4661
|
-
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const onLevel3 = await dims.list({ storeys: [3] }) const { affected } = await dims.hide(onLevel3.map((d) => d.id)) ```"
|
|
4662
|
-
},
|
|
4663
|
-
{
|
|
4664
|
-
"path": "design.dimensions.list",
|
|
4665
|
-
"namespace": "design.dimensions",
|
|
4666
|
-
"summary": "List the dimension lines in the project as full records.",
|
|
4667
|
-
"examplePrompts": [
|
|
4668
|
-
"List all the dimension lines in this model",
|
|
4669
|
-
"Which dimensions are on level 3?",
|
|
4670
|
-
"Flag any dimension line shorter than 600 mm"
|
|
4671
|
-
],
|
|
4672
|
-
"argsType": "{\n storeys?: number[]\n anchors?: ComponentHandle[]\n isHidden?: boolean\n }",
|
|
4673
|
-
"resultType": "PluginDimensionLine[]",
|
|
4674
|
-
"performance": "Array read — one host round-trip returns every record. Filter in one call rather than calling `get` per dimension. # Example ```ts const units = snaptrude.core.units const min = await units.convert(600, \"millimeters\", await units.getBabylonType()) const short = (await snaptrude.design.dimensions.list()).filter( (d) => d.length < min, ) console.log(short.map((d) => `${d.label} on storey ${d.storey}`)) ```"
|
|
4675
|
-
},
|
|
4676
|
-
{
|
|
4677
|
-
"path": "design.dimensions.show",
|
|
4678
|
-
"namespace": "design.dimensions",
|
|
4679
|
-
"summary": "Reveal hidden dimension lines — clear the user Hide flag, the inverse of {@linkcode PluginDesignDimensionsApi.hide}. Undoable. Already-visible dimensions are skipped and are not reported in `affected`.",
|
|
4680
|
-
"examplePrompts": [
|
|
4681
|
-
"Show the dimension lines again",
|
|
4682
|
-
"Unhide all the hidden dimensions",
|
|
4683
|
-
"Bring back the measurements I hid on this storey"
|
|
4684
|
-
],
|
|
4685
|
-
"argsType": "DimensionHandle[]",
|
|
4686
|
-
"resultType": "PluginDimensionsChangeResult",
|
|
4687
|
-
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const hidden = await dims.list({ isHidden: true }) await dims.show(hidden.map((d) => d.id)) ```"
|
|
4688
|
-
},
|
|
4689
4517
|
{
|
|
4690
4518
|
"path": "design.doors.exists",
|
|
4691
4519
|
"namespace": "design.doors",
|
|
@@ -4767,7 +4595,7 @@
|
|
|
4767
4595
|
{
|
|
4768
4596
|
"path": "design.doors.getSwingDirection",
|
|
4769
4597
|
"namespace": "design.doors",
|
|
4770
|
-
"summary": "Get a door's swing (hinge) handedness
|
|
4598
|
+
"summary": "Get a door's swing (hinge) handedness — whether it opens as a left-hand or right-hand door. Derived from the door mesh's reflection state, not a persisted field.",
|
|
4771
4599
|
"examplePrompts": [
|
|
4772
4600
|
"Which way does this door swing?",
|
|
4773
4601
|
"Is the selected door left-handed or right-handed?",
|
|
@@ -4832,13 +4660,13 @@
|
|
|
4832
4660
|
{
|
|
4833
4661
|
"path": "design.doors.mirror",
|
|
4834
4662
|
"namespace": "design.doors",
|
|
4835
|
-
"summary": "Mirror a door
|
|
4663
|
+
"summary": "Mirror a door across an axis, flipping its swing so it opens from the other side. Undoable as a single command.",
|
|
4836
4664
|
"examplePrompts": [
|
|
4837
4665
|
"Flip this door's swing",
|
|
4838
4666
|
"Mirror the selected door",
|
|
4839
4667
|
"Make this door open the other way",
|
|
4840
4668
|
"Reverse the hinge side of the entrance door",
|
|
4841
|
-
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing
|
|
4669
|
+
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing — axis defaults to \"x\" (the swing-flip\n// axis); pass \"y\" or \"z\" to reflect across a different axis\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst { affected } = await snaptrude.design.doors.mirror(door)\n```"
|
|
4842
4670
|
],
|
|
4843
4671
|
"argsType": "ComponentHandle",
|
|
4844
4672
|
"resultType": "PluginDesignChangeResult"
|
|
@@ -5843,6 +5671,67 @@
|
|
|
5843
5671
|
"argsType": "PluginSelectionFilter",
|
|
5844
5672
|
"resultType": "PluginDesignChangeResult"
|
|
5845
5673
|
},
|
|
5674
|
+
{
|
|
5675
|
+
"path": "design.smartLayouts.create",
|
|
5676
|
+
"namespace": "design.smartLayouts",
|
|
5677
|
+
"summary": "**Create** a smart-layout template in the library from an in-scene component cluster (walls, floors, furniture, doors, windows) — the save side of `design.create.smartLayout`.",
|
|
5678
|
+
"examplePrompts": [
|
|
5679
|
+
"Save this room's layout as a template",
|
|
5680
|
+
"Add the selected furniture cluster to my template library",
|
|
5681
|
+
"Save this arrangement as \"Meeting Room A\" under Offices\n\n# Example\n```ts\nconst selected = await snaptrude.design.selection.list()\nconst item = await snaptrude.design.smartLayouts.create({\ncomponents: selected,\nname: \"Meeting Room A\",\n})\nconsole.log(\"saved:\", item.id, item.name)\n```"
|
|
5682
|
+
],
|
|
5683
|
+
"argsType": "PluginSmartLayoutCreateArgs",
|
|
5684
|
+
"resultType": "PluginSmartLayoutCatalogItem"
|
|
5685
|
+
},
|
|
5686
|
+
{
|
|
5687
|
+
"path": "design.smartLayouts.exists",
|
|
5688
|
+
"namespace": "design.smartLayouts",
|
|
5689
|
+
"summary": "Test whether a saved smart-layout template exists for the given catalog id.",
|
|
5690
|
+
"examplePrompts": [
|
|
5691
|
+
"Is this layout template still in the library?",
|
|
5692
|
+
"Check whether this template id exists",
|
|
5693
|
+
"Verify the template is available before placing it\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.smartLayouts.listCatalog()\nconst stillAvailable = await snaptrude.design.smartLayouts.exists(entry.id)\nconsole.log(stillAvailable ? \"safe to place\" : \"removed from library\")\n```"
|
|
5694
|
+
],
|
|
5695
|
+
"argsType": "string",
|
|
5696
|
+
"resultType": "boolean"
|
|
5697
|
+
},
|
|
5698
|
+
{
|
|
5699
|
+
"path": "design.smartLayouts.getCatalogItem",
|
|
5700
|
+
"namespace": "design.smartLayouts",
|
|
5701
|
+
"summary": "Get a single saved smart-layout template by its catalog id.",
|
|
5702
|
+
"examplePrompts": [
|
|
5703
|
+
"Get the details of this saved layout template",
|
|
5704
|
+
"Look up the template with this id",
|
|
5705
|
+
"What's the floor area of this saved template?\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.smartLayouts.listCatalog()\nconst item = await snaptrude.design.smartLayouts.getCatalogItem(entry.id)\nif (item) console.log(item.name, item.categoryId)\n```"
|
|
5706
|
+
],
|
|
5707
|
+
"argsType": "string",
|
|
5708
|
+
"resultType": "PluginSmartLayoutCatalogItem | null"
|
|
5709
|
+
},
|
|
5710
|
+
{
|
|
5711
|
+
"path": "design.smartLayouts.listCatalog",
|
|
5712
|
+
"namespace": "design.smartLayouts",
|
|
5713
|
+
"summary": "List the saved smart-layout templates of the ambient library scope, optionally restricted to one category.",
|
|
5714
|
+
"examplePrompts": [
|
|
5715
|
+
"What layout templates can I place?",
|
|
5716
|
+
"List every saved smart layout in my library",
|
|
5717
|
+
"Show the templates in the \"Meeting Rooms\" category",
|
|
5718
|
+
"Browse the smart layout catalog\n\n# Example\n```ts\nconst items = await snaptrude.design.smartLayouts.listCatalog()\nfor (const item of items) console.log(item.id, item.name, item.area)\n```"
|
|
5719
|
+
],
|
|
5720
|
+
"argsType": "string",
|
|
5721
|
+
"resultType": "PluginSmartLayoutCatalogItem[]"
|
|
5722
|
+
},
|
|
5723
|
+
{
|
|
5724
|
+
"path": "design.smartLayouts.listCatalogGroups",
|
|
5725
|
+
"namespace": "design.smartLayouts",
|
|
5726
|
+
"summary": "List the smart-layout template categories of the ambient library scope. The implicit `Default` bucket is always present and listed first; the rest follow alphabetically.",
|
|
5727
|
+
"examplePrompts": [
|
|
5728
|
+
"What smart layout categories does my library have?",
|
|
5729
|
+
"List the template categories",
|
|
5730
|
+
"Which buckets can I save a layout template into?\n\n# Example\n```ts\nconst groups = await snaptrude.design.smartLayouts.listCatalogGroups()\nfor (const g of groups) console.log(g.id, g.label)\n```"
|
|
5731
|
+
],
|
|
5732
|
+
"argsType": null,
|
|
5733
|
+
"resultType": "PluginSmartLayoutCatalogGroup[]"
|
|
5734
|
+
},
|
|
5846
5735
|
{
|
|
5847
5736
|
"path": "design.transform.align",
|
|
5848
5737
|
"namespace": "design.transform",
|
|
@@ -7676,18 +7565,6 @@
|
|
|
7676
7565
|
"argsType": "string",
|
|
7677
7566
|
"resultType": "PluginProgramDepartmentsSetTargetAreaResult"
|
|
7678
7567
|
},
|
|
7679
|
-
{
|
|
7680
|
-
"path": "program.departments.setTargetCount",
|
|
7681
|
-
"namespace": "program.departments",
|
|
7682
|
-
"summary": "Set a department's target unit count.",
|
|
7683
|
-
"examplePrompts": [
|
|
7684
|
-
"Set the Bedrooms department unit count to 12",
|
|
7685
|
-
"The program needs 4 clinic blocks — update the department count",
|
|
7686
|
-
"Update the target count for department dep_123\n\n# Example\n```ts\nawait snaptrude.program.departments.setTargetCount(\"dep_123\", 12)\n```"
|
|
7687
|
-
],
|
|
7688
|
-
"argsType": "string",
|
|
7689
|
-
"resultType": "PluginProgramDepartmentsSetTargetCountResult"
|
|
7690
|
-
},
|
|
7691
7568
|
{
|
|
7692
7569
|
"path": "program.departments.unassign",
|
|
7693
7570
|
"namespace": "program.departments",
|
|
@@ -7714,65 +7591,6 @@
|
|
|
7714
7591
|
"argsType": "string",
|
|
7715
7592
|
"resultType": "PluginProgramDepartmentsUpdateResult"
|
|
7716
7593
|
},
|
|
7717
|
-
{
|
|
7718
|
-
"path": "program.labels.create",
|
|
7719
|
-
"namespace": "program.labels",
|
|
7720
|
-
"summary": "Create labels (program rows), optionally creating their spaces too.",
|
|
7721
|
-
"examplePrompts": [
|
|
7722
|
-
"Add program rows for 4 exam rooms of 120 sqft each",
|
|
7723
|
-
"Create the labels from this interpreted program",
|
|
7724
|
-
"Add an Office label with a 2000 sqft target to the Admin department",
|
|
7725
|
-
"Create program rows and their spaces on the canvas\n\n# Example\n```ts\nconst { labelIds } = await snaptrude.program.labels.create(\n[{ name: \"Exam Room\", targetArea: 480, targetCount: 4, departmentName: \"Clinic\" }],\n{ units: \"ft2\" },\n)\n```"
|
|
7726
|
-
],
|
|
7727
|
-
"argsType": "PluginProgramLabelCreateItem[]",
|
|
7728
|
-
"resultType": "PluginProgramLabelsCreateResult"
|
|
7729
|
-
},
|
|
7730
|
-
{
|
|
7731
|
-
"path": "program.labels.get",
|
|
7732
|
-
"namespace": "program.labels",
|
|
7733
|
-
"summary": "Get a single label by id.",
|
|
7734
|
-
"examplePrompts": [
|
|
7735
|
-
"Get the label with id lbl_12",
|
|
7736
|
-
"What is the target area of this program row?\n\n# Example\n```ts\nconst label = await snaptrude.program.labels.get(\"lbl_12\")\nif (label) console.log(label.name, label.targetArea, label.units)\n```"
|
|
7737
|
-
],
|
|
7738
|
-
"argsType": "string",
|
|
7739
|
-
"resultType": "PluginProgramLabelsGetResult"
|
|
7740
|
-
},
|
|
7741
|
-
{
|
|
7742
|
-
"path": "program.labels.list",
|
|
7743
|
-
"namespace": "program.labels",
|
|
7744
|
-
"summary": "List the labels (program rows) of the active program.",
|
|
7745
|
-
"examplePrompts": [
|
|
7746
|
-
"List all the program rows with their target areas",
|
|
7747
|
-
"What space labels are in the program and how many of each?",
|
|
7748
|
-
"Show every label with its department and target\n\n# Example\n```ts\nconst { units, labels } = await snaptrude.program.labels.list()\nfor (const l of labels) console.log(l.name, l.targetArea, units, l.targetCount)\n```"
|
|
7749
|
-
],
|
|
7750
|
-
"argsType": null,
|
|
7751
|
-
"resultType": "PluginProgramLabelsListResult"
|
|
7752
|
-
},
|
|
7753
|
-
{
|
|
7754
|
-
"path": "program.labels.setTargetArea",
|
|
7755
|
-
"namespace": "program.labels",
|
|
7756
|
-
"summary": "Set a label's total target area.",
|
|
7757
|
-
"examplePrompts": [
|
|
7758
|
-
"Set the Exam Room target area to 480 sqft",
|
|
7759
|
-
"Give the Corridor program row a 150 sqm target",
|
|
7760
|
-
"Update the area target for label lbl_12\n\n# Example\n```ts\nawait snaptrude.program.labels.setTargetArea(\"lbl_12\", 480, \"ft2\")\n```"
|
|
7761
|
-
],
|
|
7762
|
-
"argsType": "string",
|
|
7763
|
-
"resultType": "PluginProgramLabelsSetTargetAreaResult"
|
|
7764
|
-
},
|
|
7765
|
-
{
|
|
7766
|
-
"path": "program.labels.setTargetCount",
|
|
7767
|
-
"namespace": "program.labels",
|
|
7768
|
-
"summary": "Set a label's target unit count (how many of this space the program calls for).",
|
|
7769
|
-
"examplePrompts": [
|
|
7770
|
-
"Set the Exam Room count to 6",
|
|
7771
|
-
"The program needs 12 patient rooms — update the count\n\n# Example\n```ts\nawait snaptrude.program.labels.setTargetCount(\"lbl_12\", 6)\n```"
|
|
7772
|
-
],
|
|
7773
|
-
"argsType": "string",
|
|
7774
|
-
"resultType": "PluginProgramLabelsSetTargetCountResult"
|
|
7775
|
-
},
|
|
7776
7594
|
{
|
|
7777
7595
|
"path": "program.layout.applySolution",
|
|
7778
7596
|
"namespace": "program.layout",
|
|
@@ -7846,81 +7664,6 @@
|
|
|
7846
7664
|
"argsType": null,
|
|
7847
7665
|
"resultType": "PluginProgramLayoutStackResult"
|
|
7848
7666
|
},
|
|
7849
|
-
{
|
|
7850
|
-
"path": "program.metadata.createHeader",
|
|
7851
|
-
"namespace": "program.metadata",
|
|
7852
|
-
"summary": "Create a metadata header (a custom column on the Program Data sheet).",
|
|
7853
|
-
"examplePrompts": [
|
|
7854
|
-
"Add a custom column called Occupancy to the program sheet",
|
|
7855
|
-
"Create a metadata header named Department Code",
|
|
7856
|
-
"Make a new program-mode column for Finish Level\n\n# Example\n```ts\nconst header = await snaptrude.program.metadata.createHeader(\"Occupancy\", {\ndescription: \"People per room\",\n})\n```"
|
|
7857
|
-
],
|
|
7858
|
-
"argsType": "string",
|
|
7859
|
-
"resultType": "PluginProgramMetadataCreateHeaderResult"
|
|
7860
|
-
},
|
|
7861
|
-
{
|
|
7862
|
-
"path": "program.metadata.get",
|
|
7863
|
-
"namespace": "program.metadata",
|
|
7864
|
-
"summary": "Get one space's metadata values, keyed by header id.",
|
|
7865
|
-
"examplePrompts": [
|
|
7866
|
-
"Get the metadata on this space",
|
|
7867
|
-
"Read the custom column values for space sp_12",
|
|
7868
|
-
"What is this room's Occupancy metadata?\n\n# Example\n```ts\nconst record = await snaptrude.program.metadata.get(\"sp_12\")\nif (record) console.log(record.values)\n```"
|
|
7869
|
-
],
|
|
7870
|
-
"argsType": "ComponentHandle",
|
|
7871
|
-
"resultType": "PluginProgramMetadataGetResult"
|
|
7872
|
-
},
|
|
7873
|
-
{
|
|
7874
|
-
"path": "program.metadata.list",
|
|
7875
|
-
"namespace": "program.metadata",
|
|
7876
|
-
"summary": "List metadata values for many spaces at once.",
|
|
7877
|
-
"examplePrompts": [
|
|
7878
|
-
"List the metadata of every space",
|
|
7879
|
-
"Read the custom column values for all rooms",
|
|
7880
|
-
"Get the metadata for these three spaces in one call\n\n# Example\n```ts\nconst { records } = await snaptrude.program.metadata.list()\nconst byId = Object.fromEntries(records.map((r) => [r.spaceId, r.values]))\n```"
|
|
7881
|
-
],
|
|
7882
|
-
"argsType": "ComponentHandle[]",
|
|
7883
|
-
"resultType": "PluginProgramMetadataListResult",
|
|
7884
|
-
"performance": "One round-trip for any number of spaces — use this instead of a `get` loop."
|
|
7885
|
-
},
|
|
7886
|
-
{
|
|
7887
|
-
"path": "program.metadata.listHeaders",
|
|
7888
|
-
"namespace": "program.metadata",
|
|
7889
|
-
"summary": "List the metadata headers (custom columns) of the Program Data sheet.",
|
|
7890
|
-
"examplePrompts": [
|
|
7891
|
-
"List the custom metadata columns in program mode",
|
|
7892
|
-
"What metadata headers does the program sheet have?",
|
|
7893
|
-
"Show every custom column with its id\n\n# Example\n```ts\nconst { headers } = await snaptrude.program.metadata.listHeaders()\nfor (const h of headers) console.log(h.headerId, h.name)\n```"
|
|
7894
|
-
],
|
|
7895
|
-
"argsType": null,
|
|
7896
|
-
"resultType": "PluginProgramMetadataListHeadersResult"
|
|
7897
|
-
},
|
|
7898
|
-
{
|
|
7899
|
-
"path": "program.metadata.update",
|
|
7900
|
-
"namespace": "program.metadata",
|
|
7901
|
-
"summary": "Update a space's metadata values (sparse).",
|
|
7902
|
-
"examplePrompts": [
|
|
7903
|
-
"Set the Occupancy metadata of this space to 4",
|
|
7904
|
-
"Store a department code on the selected rooms",
|
|
7905
|
-
"Write custom column values onto space sp_12",
|
|
7906
|
-
"Clear the Finish Level metadata on this space\n\n# Example\n```ts\nconst header = await snaptrude.program.metadata.createHeader(\"Occupancy\")\nawait snaptrude.program.metadata.update(\"sp_12\", { [header.headerId]: 4 })\n```"
|
|
7907
|
-
],
|
|
7908
|
-
"argsType": "ComponentHandle",
|
|
7909
|
-
"resultType": "PluginProgramMetadataUpdateResult"
|
|
7910
|
-
},
|
|
7911
|
-
{
|
|
7912
|
-
"path": "program.metadata.updateMany",
|
|
7913
|
-
"namespace": "program.metadata",
|
|
7914
|
-
"summary": "Update metadata values on many spaces in one undoable step.",
|
|
7915
|
-
"examplePrompts": [
|
|
7916
|
-
"Fill the Occupancy column for all bedrooms",
|
|
7917
|
-
"Write metadata onto every selected space at once",
|
|
7918
|
-
"Bulk-update custom column values\n\n# Example\n```ts\nawait snaptrude.program.metadata.updateMany([\n{ spaceId: \"sp_12\", values: { [headerId]: 4 } },\n{ spaceId: \"sp_13\", values: { [headerId]: 2 } },\n])\n```"
|
|
7919
|
-
],
|
|
7920
|
-
"argsType": "PluginProgramMetadataUpdateItem[]",
|
|
7921
|
-
"resultType": "PluginProgramMetadataUpdateManyResult",
|
|
7922
|
-
"performance": "One round-trip and one undo step for up to 1000 spaces — use this instead of an `update` loop."
|
|
7923
|
-
},
|
|
7924
7667
|
{
|
|
7925
7668
|
"path": "program.metrics.get",
|
|
7926
7669
|
"namespace": "program.metrics",
|
|
@@ -8159,19 +7902,6 @@
|
|
|
8159
7902
|
"argsType": "{\n name?: string\n }",
|
|
8160
7903
|
"resultType": "PluginProgramSpreadsheetBindingsRefreshResult"
|
|
8161
7904
|
},
|
|
8162
|
-
{
|
|
8163
|
-
"path": "program.spreadsheet.createCustomSheet",
|
|
8164
|
-
"namespace": "program.spreadsheet",
|
|
8165
|
-
"summary": "Create a **custom program sheet** — a live view of the program grouped by a configurable hierarchy (the Program tab's \"Custom\" sheet with *Organize → Group by*).",
|
|
8166
|
-
"examplePrompts": [
|
|
8167
|
-
"Create a custom sheet grouped by department then sub-department",
|
|
8168
|
-
"Make a program view grouped by storey and label",
|
|
8169
|
-
"Build a grouped program sheet for the healthcare hierarchy",
|
|
8170
|
-
"Add a custom sheet with a department → room type group-by\n\n# Example\n```ts\nconst { headers } = await snaptrude.program.metadata.listHeaders()\nconst subDept = headers.find((h) => h.name === \"Sub-department\")\nawait snaptrude.program.spreadsheet.createCustomSheet(\"Clinical Program\", {\ngroupBy: [\"departmentName\", subDept.headerId, \"label\"],\nproperties: [\"label\", \"count\", \"areas\", \"netAreaAchieved\"],\n})\n```"
|
|
8171
|
-
],
|
|
8172
|
-
"argsType": "string",
|
|
8173
|
-
"resultType": "PluginProgramSpreadsheetCustomSheetResult"
|
|
8174
|
-
},
|
|
8175
7905
|
{
|
|
8176
7906
|
"path": "program.spreadsheet.createSheet",
|
|
8177
7907
|
"namespace": "program.spreadsheet",
|
|
@@ -8237,17 +7967,6 @@
|
|
|
8237
7967
|
"argsType": "{\n limit?: number\n }",
|
|
8238
7968
|
"resultType": "PluginProgramSpreadsheetGetAuditLogResult"
|
|
8239
7969
|
},
|
|
8240
|
-
{
|
|
8241
|
-
"path": "program.spreadsheet.getCustomSheet",
|
|
8242
|
-
"namespace": "program.spreadsheet",
|
|
8243
|
-
"summary": "Get a custom program sheet's configuration.",
|
|
8244
|
-
"examplePrompts": [
|
|
8245
|
-
"How is the Clinical Program sheet grouped?",
|
|
8246
|
-
"Get the group-by configuration of this custom sheet\n\n# Example\n```ts\nconst cfg = await snaptrude.program.spreadsheet.getCustomSheet(\"Clinical Program\")\nif (cfg) console.log(cfg.groupBy, cfg.properties)\n```"
|
|
8247
|
-
],
|
|
8248
|
-
"argsType": "string",
|
|
8249
|
-
"resultType": "PluginProgramSpreadsheetGetCustomSheetResult"
|
|
8250
|
-
},
|
|
8251
7970
|
{
|
|
8252
7971
|
"path": "program.spreadsheet.getMaterialTakeoff",
|
|
8253
7972
|
"namespace": "program.spreadsheet",
|
|
@@ -8314,28 +8033,6 @@
|
|
|
8314
8033
|
"argsType": "string",
|
|
8315
8034
|
"resultType": "PluginProgramSpreadsheetHighlightCellsResult"
|
|
8316
8035
|
},
|
|
8317
|
-
{
|
|
8318
|
-
"path": "program.spreadsheet.listCustomSheetProperties",
|
|
8319
|
-
"namespace": "program.spreadsheet",
|
|
8320
|
-
"summary": "List the property ids a custom program sheet can show as columns or group by.",
|
|
8321
|
-
"examplePrompts": [
|
|
8322
|
-
"What can I group a custom program sheet by?",
|
|
8323
|
-
"List the columns available for a custom sheet\n\n# Example\n```ts\nconst { properties } = await snaptrude.program.spreadsheet.listCustomSheetProperties()\nconst groupable = properties.filter((p) => p.groupable).map((p) => p.id)\n```"
|
|
8324
|
-
],
|
|
8325
|
-
"argsType": null,
|
|
8326
|
-
"resultType": "PluginProgramSpreadsheetListCustomSheetPropertiesResult"
|
|
8327
|
-
},
|
|
8328
|
-
{
|
|
8329
|
-
"path": "program.spreadsheet.listCustomSheets",
|
|
8330
|
-
"namespace": "program.spreadsheet",
|
|
8331
|
-
"summary": "List the custom program sheets in the workbook with their configurations.",
|
|
8332
|
-
"examplePrompts": [
|
|
8333
|
-
"List the custom program sheets",
|
|
8334
|
-
"Which sheets are grouped program views?\n\n# Example\n```ts\nconst { sheets } = await snaptrude.program.spreadsheet.listCustomSheets()\n```"
|
|
8335
|
-
],
|
|
8336
|
-
"argsType": null,
|
|
8337
|
-
"resultType": "PluginProgramSpreadsheetListCustomSheetsResult"
|
|
8338
|
-
},
|
|
8339
8036
|
{
|
|
8340
8037
|
"path": "program.spreadsheet.listSheets",
|
|
8341
8038
|
"namespace": "program.spreadsheet",
|
|
@@ -8512,18 +8209,6 @@
|
|
|
8512
8209
|
"argsType": "PluginSpreadsheetTransactionOp[]",
|
|
8513
8210
|
"resultType": "PluginProgramSpreadsheetTransactionResult"
|
|
8514
8211
|
},
|
|
8515
|
-
{
|
|
8516
|
-
"path": "program.spreadsheet.updateCustomSheet",
|
|
8517
|
-
"namespace": "program.spreadsheet",
|
|
8518
|
-
"summary": "Update a custom program sheet's group-by hierarchy, columns, or group colors.",
|
|
8519
|
-
"examplePrompts": [
|
|
8520
|
-
"Change the custom sheet to group by storey first",
|
|
8521
|
-
"Add the Occupancy column to my grouped program sheet",
|
|
8522
|
-
"Regroup the Clinical Program sheet by department only\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.updateCustomSheet(\"Clinical Program\", {\ngroupBy: [\"storey\", \"departmentName\"],\n})\n```"
|
|
8523
|
-
],
|
|
8524
|
-
"argsType": "string",
|
|
8525
|
-
"resultType": "PluginProgramSpreadsheetCustomSheetResult"
|
|
8526
|
-
},
|
|
8527
8212
|
{
|
|
8528
8213
|
"path": "workspace.closePresentMode",
|
|
8529
8214
|
"namespace": "workspace",
|
|
@@ -8536,17 +8221,6 @@
|
|
|
8536
8221
|
"argsType": null,
|
|
8537
8222
|
"resultType": "void"
|
|
8538
8223
|
},
|
|
8539
|
-
{
|
|
8540
|
-
"path": "workspace.closeProgramMode",
|
|
8541
|
-
"namespace": "workspace",
|
|
8542
|
-
"summary": "Close the Program tab.",
|
|
8543
|
-
"examplePrompts": [
|
|
8544
|
-
"Close program mode",
|
|
8545
|
-
"Close the Program tab\n\n# Example\n```ts\nawait snaptrude.workspace.closeProgramMode()\n```"
|
|
8546
|
-
],
|
|
8547
|
-
"argsType": null,
|
|
8548
|
-
"resultType": "void"
|
|
8549
|
-
},
|
|
8550
8224
|
{
|
|
8551
8225
|
"path": "workspace.openPresentMode",
|
|
8552
8226
|
"namespace": "workspace",
|
|
@@ -8559,18 +8233,6 @@
|
|
|
8559
8233
|
"argsType": null,
|
|
8560
8234
|
"resultType": "void"
|
|
8561
8235
|
},
|
|
8562
|
-
{
|
|
8563
|
-
"path": "workspace.openProgramMode",
|
|
8564
|
-
"namespace": "workspace",
|
|
8565
|
-
"summary": "Open Program mode — the Program tab the `program.spreadsheet.*` calls run in.",
|
|
8566
|
-
"examplePrompts": [
|
|
8567
|
-
"Open program mode",
|
|
8568
|
-
"Open the Program tab so I can build a custom sheet",
|
|
8569
|
-
"Switch to the program spreadsheet\n\n# Example\n```ts\nawait snaptrude.workspace.openProgramMode()\nconst { sheets } = await snaptrude.program.spreadsheet.listSheets()\n```"
|
|
8570
|
-
],
|
|
8571
|
-
"argsType": null,
|
|
8572
|
-
"resultType": "void"
|
|
8573
|
-
},
|
|
8574
8236
|
{
|
|
8575
8237
|
"path": "workspace.projects.copy",
|
|
8576
8238
|
"namespace": "workspace.projects",
|