vw_duplicate_layer
Copy a design layer and all its objects to create a variant for testing changes without touching the original; the duplicate keeps scale and layer-order position.
Instructions
Copy a design layer with all its objects, to try a variant without touching the original.
Changes the document: one new layer, one revertible step (vw_revert_last deletes the copy). The copy keeps the scale and is placed right after the source in the layer list; the active layer stays active. Use vw_create_layer for an empty layer. Returns {document, layer, source, objects, source_objects, after_source, scale, visibility, uuid_map when asked for}; objects below source_objects means not every object was copied.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>",
"name": "<name>"
},
"name": "vw_duplicate_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new layer; must not exist yet. | |
| source | Yes | Name of the existing design layer to copy. | |
| document | No | Name of the document this must run in, as vw_list_documents shows it (".vwx" may be left out) or its full path. If another document is active, nothing changes. Omit to act on whatever document is active. | |
| uuid_map | No | True: also return `uuid_map` {source object uuid: copy uuid}, including objects inside groups. Default False. | |
| visibility | No | Visibility of the copy: "visible", "hidden" or "gray". Default: the same as the source has now. Layers share coordinates, so a visible copy lies exactly on top of the original. |