Create use reference
create_useCreate a use element that references an existing SVG object, enabling reuse where edits to the original propagate to all instances.
Instructions
Create a <use href="#href_id"> referencing an existing same-document object.
When to use: instancing / cloning an existing element so edits to the original propagate. To
deep-COPY (independent) use duplicate_object; to grid-repeat use tile.
Key params: href_id MUST name an existing element (safe-id charset, required to exist);
external / javascript: / url(...) references are rejected — only a same-document #id. Into
parent_id (must exist) or the document default parent. Placement (translate-scaling trap):
<use> applies x / y as a translation BEFORE its transform, so scale(2) + x="10"
shifts by 20 — prefer EITHER x / y alone OR fold the translation into transform
(e.g. translate(10,0) scale(2)); do not mix x / y with a scaling transform.
Return shape: CreateResult — object_id is the new <use> id, bbox=None, plus the pipeline
fields (operation_id, snapshot_id, changed, preview).
Example: create_use(doc_id, "logo", x=200, y=0)
Render and look before you trust this edit: render with render_preview (or live_render_view)
and inspect the result before relying on it; restore_snapshot reverts it if it is wrong.
Risk class: medium (reversible write-new on the working copy; original untouched).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| doc_id | Yes | ||
| href_id | Yes | ||
| object_id | No | ||
| parent_id | No | ||
| transform | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | ||
| doc_id | Yes | ||
| changed | Yes | ||
| summary | No | ||
| object_id | Yes | ||
| snapshot_id | Yes | ||
| operation_id | Yes | ||
| preview_after | No | ||
| preview_before | No |