CLI command design

sch-svg

Renders Altium schematic documents, schematic libraries, or project schematics as SVG artifacts.

Usage

altium-cruncher sch-svg CPU.SchDoc -o output/sch-svg
altium-cruncher sch-svg Hydroscope.PrjPcb

Arguments

file accepts .SchDoc, .SchLib, or .PrjPcb. When omitted, the command attempts project auto-detection. -o selects the output directory.

Output

The command writes schematic SVG bundles under the output directory. The default output directory is ./output/sch-svg. SchDoc and PrjPcb inputs are compiled through Design b0: one SVG is emitted per canonical page occurrence, every SVG uses altium_cruncher.schematic.svg.enrichment.b0, and linked source groups carry page-occurrence, artifact, element, and graph-target references. The bundle also writes design/<input>_design.json and schematic_svg_manifest.json with schema altium_cruncher.schematic_svg_manifest.b0, making those references independently resolvable without another command. The graph is stored once in the Design sidecar rather than duplicated in every SVG. SchLib inputs remain logical, unscoped symbol previews. Schematic rendering uses Altium Monkey's onscreen font-resolution path and logs warnings when a requested font is substituted, resolved through an open-source fallback, or left on hard fallback metrics. Future output naming should use the shared output path template resolver.

Tests

L3 verifies exhaustive compiled SVG graph-link closure for both a standalone Hydroscope SchDoc and the complete Hydroscope project. Broader design-review tests exercise repeated-page behavior with Node Test Array, while SchLib tests preserve logical preview behavior.