Inkscape operation reference
Generated from the current declarations. Do not edit this file by hand.
Types, limits and defaults below describe resolved values. Runtime expressions must produce these types. Unknown options are rejected; defaults apply only when omitted. Constructor options must be constant after document composition.
Index#
blockDiagram#
Draws a small technical block diagram from boxes you place yourself (x, y, width, height in millimetres) and left-to-right arrows between them. Inkscape writes an editable diagram.svg, exports diagram.png and the measured geometry is saved as diagram-measurements.json; the run succeeds only if the real text and shapes fit as declared. Choose it when you need control over positions; use flowDiagram to have positions derived from step dependencies.
Common mistakes and assumptions:
- Every arrow must run left to right with at least max(clearance, 3) mm between the boxes, and must not pass through another box.
- Text that fits on paper may still overflow in the installed font (LABEL_OVERFLOW); enlarge the box, shorten the label or reduce fontSize.
- The PNG is flattened; keep diagram.svg for editing. No custom SVG, styles or scripts can be supplied.
Native binding: Inkscape SVG/query/export. Output kind: ["image","text"].
Inputs: none.
| Option | Meaning | Type / constraints | Default |
|---|---|---|---|
width |
Page width in millimetres, 20 to 500. All boxes, including their 0.4 mm outline, must lie at least margin from the page edges. The exported PNG is width x dpi / 25.4 pixels wide (at most 4096). | {"type":"number","minimum":20,"maximum":500} |
required |
height |
Page height in millimetres, 20 to 500. All boxes, including their 0.4 mm outline, must lie at least margin from the page edges. The exported PNG is height x dpi / 25.4 pixels high (at most 4096). | {"type":"number","minimum":20,"maximum":500} |
required |
margin |
Minimum mm clearance from page edges to stroked rectangles; default 5 mm. | {"type":"number","minimum":1,"maximum":50} |
5 |
clearance |
Minimum Euclidean mm separation between rectangle strokes, default 5 mm; left-to-right connectors also require at least 3 mm for arrows. | {"type":"number","minimum":1,"maximum":50} |
5 |
padding |
Minimum mm inset for all actual native label glyph bounds; default 2 mm. Native font-dependent overflow is a distinct execution fault. | {"type":"number","minimum":1,"maximum":20} |
2 |
fontSize |
Sans-serif text font size in mm; default 3 mm. Lower this or enlarge the box if native queried text bounds overflow. | {"type":"number","minimum":1,"maximum":10} |
3 |
dpi |
Native PNG export pixels per inch, 72–192, default 96; page pixels are nearest-integer mm*dpi/25.4 with a 4096 limit per axis. | {"type":"integer","minimum":72,"maximum":192} |
96 |
boxes |
The labelled boxes, 1 to 32. For blockDiagram each box also gives x, y, width and height in millimetres; for flowDiagram only id, label and colour are given and geometry is derived. | {"type":"array","minItems":1,"maxItems":32,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"required":true},"label":{"type":"string","minLength":1,"maxLength":80,"required":true},"x":{"type":"number","minimum":0,"maximum":1000,"required":true},"y":{"type":"number","minimum":0,"maximum":1000,"required":true},"width":{"type":"number","minimum":5,"maximum":1000,"required":true},"height":{"type":"number","minimum":5,"maximum":1000,"required":true},"colour":{"type":"enum","values":["blue","green","amber"],"default":"blue"}}}} |
required |
links |
Up to 48 arrows between declared boxes. In blockDiagram the source box must be to the left of its target; in flowDiagram links are dependencies that decide the column layout and must not form a cycle. | {"type":"array","maxItems":48,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"required":true},"source":{"type":"string","minLength":1,"maxLength":32,"required":true},"target":{"type":"string","minLength":1,"maxLength":32,"required":true}}}} |
[] |
flowDiagram#
Draws a dependency flow chart from named steps and directed links without any coordinates: each step is placed one column to the right of its latest predecessor, and steps in the same column are stacked in alphabetical order of their IDs. Outputs are the same as blockDiagram (editable SVG, PNG and measured JSON, including the derived layout). Choose it for process or pipeline charts; use blockDiagram when you need manual placement.
Common mistakes and assumptions:
- Circular dependencies fail with FLOW_CYCLE; a connector that would cross another card fails with FLOW_ROUTING_COLLISION, typically for links that skip columns.
- Renaming a step can move it to another row, because rows follow alphabetical ID order; reordering the arrays does not.
- The page must be large enough for all columns and the tallest column plus margins (FLOW_PAGE_OVERFLOW reports the required size); text is never shrunk automatically.
Native binding: Inkscape DAG layout/query/export. Output kind: ["image","text"].
Inputs: none.
| Option | Meaning | Type / constraints | Default |
|---|---|---|---|
width |
Page width in millimetres, 20 to 500. All boxes, including their 0.4 mm outline, must lie at least margin from the page edges. The exported PNG is width x dpi / 25.4 pixels wide (at most 4096). | {"type":"number","minimum":20,"maximum":500} |
required |
height |
Page height in millimetres, 20 to 500. All boxes, including their 0.4 mm outline, must lie at least margin from the page edges. The exported PNG is height x dpi / 25.4 pixels high (at most 4096). | {"type":"number","minimum":20,"maximum":500} |
required |
margin |
Minimum mm clearance from page edges to stroked rectangles; default 5 mm. | {"type":"number","minimum":1,"maximum":50} |
5 |
clearance |
Minimum Euclidean mm separation between rectangle strokes, default 5 mm; left-to-right connectors also require at least 3 mm for arrows. | {"type":"number","minimum":1,"maximum":50} |
5 |
padding |
Minimum mm inset for all actual native label glyph bounds; default 2 mm. Native font-dependent overflow is a distinct execution fault. | {"type":"number","minimum":1,"maximum":20} |
2 |
fontSize |
Sans-serif text font size in mm; default 3 mm. Lower this or enlarge the box if native queried text bounds overflow. | {"type":"number","minimum":1,"maximum":10} |
3 |
dpi |
Native PNG export pixels per inch, 72–192, default 96; page pixels are nearest-integer mm*dpi/25.4 with a 4096 limit per axis. | {"type":"integer","minimum":72,"maximum":192} |
96 |
boxes |
The labelled boxes, 1 to 32. For blockDiagram each box also gives x, y, width and height in millimetres; for flowDiagram only id, label and colour are given and geometry is derived. | {"type":"array","minItems":1,"maxItems":32,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"required":true},"label":{"type":"string","minLength":1,"maxLength":80,"required":true},"colour":{"type":"enum","values":["blue","green","amber"],"default":"blue"}}}} |
required |
links |
Up to 48 arrows between declared boxes. In blockDiagram the source box must be to the left of its target; in flowDiagram links are dependencies that decide the column layout and must not form a cycle. | {"type":"array","maxItems":48,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32,"required":true},"source":{"type":"string","minLength":1,"maxLength":32,"required":true},"target":{"type":"string","minLength":1,"maxLength":32,"required":true}}}} |
[] |
boxWidth |
Uniform flow card width in mm, default 26. Together with DAG rank count and rankGap determines required page width; actual native glyph bounds must fit padding. | {"type":"number","minimum":5,"maximum":100} |
26 |
boxHeight |
Uniform flow card height in mm, default 14. Together with largest rank lane count and laneGap determines required page height; native label bounds must fit padding. | {"type":"number","minimum":5,"maximum":100} |
14 |
rankGap |
Horizontal mm clearance between stroked flow-card columns, default 15. Must reach clearance and at least 3 mm for arrows. | {"type":"number","minimum":3,"maximum":100} |
15 |
laneGap |
Vertical gap in millimetres between the outlines of cards stacked in the same column (flowDiagram only), 1 to 100; it must be at least clearance. Cards in a column are ordered alphabetically by ID. | {"type":"number","minimum":1,"maximum":100} |
8 |