sch_render_svg
Generate a self-contained SVG visualization of the active schematic for layout, readability review, sharing, or CI thumbnails, with tagged elements for downstream interactive overlays.
Instructions
Render the active SchDoc to an SVG file (in-house renderer).
SCOPE: this is a VISUAL artifact for when an image is genuinely
needed (layout/readability review, sharing a picture, a CI
thumbnail). It is NOT an input to a design review. NEVER judge
connectivity, part values, ratings, or pin functions from this
render -- a wire that looks joined may not share a net, and a
net can be correct while the drawing looks messy. Connectivity
and part facts come from the compiled netlist + part data
(proj_get_nets, proj_get_connectivity_many, obj_crossref_net,
proj_get_unconnected_pins, proj_get_erc_violations,
design_review_snapshot), never from a picture.
Pulls every component, pin, wire, junction, net label, port and
power port from the active schematic via the bridge, then emits
a self-contained SVG with data-designator, data-net,
data-pin attributes on every meaningful group so a downstream
consumer (the web dashboard, an LLM tool, a CI check) can hook
interaction without re-parsing.
v1 draws components as labelled bounding-box bodies with pin stubs from the body to the electrical end. Full symbol-internal primitives (rectangles / lines / arcs inside each symbol) are deferred to v2 -- the v1 output is recognisable and ready for interactive overlay but does not yet draw the actual symbol art.
Args:
output_path: Where to write the SVG. Defaults to the
transient <workspace>/renders/ dir (kept out of the
workspace root so renders don't pile up in your folder).
margin_mils: Padding around the geometry bbox in mils
(default 200).
flip_y: When True (default) flip the Y axis so the output
reads in Altium's conventional bottom-left-origin space
rather than SVG's top-left-origin.
Returns:
Dict with ok, svg_path, doc, counts
(one entry per primitive type).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flip_y | No | ||
| margin_mils | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||