Add a shape
visio_add_shapeAdd a shape to a Visio page at specified coordinates, using an existing master or primitive, and get the new shape's ID.
Instructions
Add a shape to a page and return its new id.
Prefer a master that the drawing already uses, so the new shape inherits the drawing's style; visio_list_masters shows what is available. Without a master you get a plain drawn shape.
Args: x: Centre of the shape, inches from the left edge. y: Centre of the shape, inches from the bottom edge. text: Text to put in the shape. master: Master name to drop, for example "Process". stencil: Stencil to look in if the master is not already available. width: Width in inches. Defaults to the master's own size, or 2. height: Height in inches. Defaults to the master's own size, or 1. primitive: Shape to draw when no master is given: rectangle, ellipse or line. page: Page name or 1-based index. Omit for the page on screen. document: File name or 1-based index. Omit for the active document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| page | No | ||
| text | No | ||
| width | No | ||
| height | No | ||
| master | No | ||
| stencil | No | ||
| document | No | ||
| primitive | No | rectangle |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| page | No | ||
| action | Yes | ||
| detail | Yes | ||
| affected | No | ||
| document | No | ||
| shape_id | No |