add_node_to_view
Add an ArchiMate element as a visual node in a view. Automatically places node to avoid overlaps or uses specified coordinates.
Instructions
Add an ArchiMate element as a visual node in a view.
If `x`/`y` are omitted, or the requested rectangle would overlap an
existing node, the server places the node in the next free slot.
Default node size is 160x80 (junctions are normalized to 32x32 by
`auto_layout_view`).
Args:
view_id: ID of the target view.
element_id: ID of the element to render in the view.
x: Optional preferred X coordinate (top-left, integer pixels).
y: Optional preferred Y coordinate (top-left, integer pixels).
width: Node width in pixels. Defaults to 160.
height: Node height in pixels. Defaults to 80.
node_id: Optional stable visual node ID. When omitted a UUID is
generated.
Returns:
Success envelope with `data.node_id` containing the visual
node's UUID.
Errors:
`ViewNotFoundError` (returned as `ModelOperationError` from the
manager) when `view_id` is unknown.
`ElementNotFoundError` when `element_id` is unknown.
`ModelOperationError` for a duplicate `node_id`.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| width | No | ||
| height | No | ||
| node_id | No | ||
| view_id | Yes | ||
| element_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||