Draw the single-line or multi-line diagram
renderDraw electrical single-line or multi-line diagrams from a uniwire document, exporting them as SVG or PDF with optional color coding, views, and sheet selection.
Instructions
Draw the electrical diagram (schéma unifilaire / multifilaire). kind: 'single-line' or 'multi-line'; view: a view id of the document (e.g. a wire-marking view). format 'svg' returns the SVG text of every sheet (or of 'sheet', numbered from 1); 'pdf' writes to 'path' if given, else returns base64 (requires the uniwire[pdf] extra); on the hosted server it returns pdf_url (the PDF drawn by uniwire) instead. color: 'none' | 'conductors' | 'phase' | 'source' | 'status' | 'voltage' (adds a legend); conductor_colors: 'iec' (IEC 60445) | 'us'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | 'single-line' or 'multi-line' (one line per conductor). | single-line |
| path | No | File to write the PDF to (local server only). | |
| view | No | Id of a view of the document (its 'views' list); default: the first view of the requested kind. | |
| color | No | Colouring: 'none', 'conductors', 'phase', 'source', 'status' or 'voltage' (adds a legend). | |
| sheet | No | Only this sheet (numbered from 1); default: all. | |
| format | No | 'svg' or 'pdf'. | svg |
| document | Yes | The uniwire document of the electrical installation: a JSON object, or its JSON text, as returned by get_example, apply_patch or normalize (a file path is accepted when the server runs locally). | |
| conductor_colors | No | Conductor colour convention: 'iec' (IEC 60445) or 'us'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||