This is a Python command-line script that can parse Altium schematic (*.SchDoc) files, convert them to SVG images, or display them in a window. It is incomplete and there are probably many schematic elements and settings that it does not (yet) understand.
The schematic file format has been documented somewhat in format.md.
You can redistribute and modify this program under the terms of the Do What The Fuck You Want To Public License (WTFPL) version 2, as published by Sam Hocevar. See the COPYING file for details.
- Python 3, from https://www.python.org/
- The olefile package, https://decalage.info/python/olefileio
- TK (Only required to display schematics in a window)
- Pillow, from https://python-pillow.org/ (Only to display schematics that contain bitmap images)
Conversion to SVG:
python3 altium.py schematic.SchDoc > output.svgDisplay in a window:
python3 altium.py --renderer tk schematic.SchDocThis fork carries small compatibility patches on top of the upstream (unmaintained since 2021) project:
- Python ≥3.10:
collections.abcimports. - Decode property values and font names as GBK instead of ASCII, so schematics authored with Chinese-locale Altium (CM-drawn boards) render instead of crashing.
- Tolerate components missing
SOURCELIBRARYNAME/CURRENTPARTIDand hidden designators missingTEXT, as produced by recent Altium versions.
pip install olefile # only dependency
python3 altium.py "02 STM32.SchDoc" > sheet2.svg
# repeat per sheet, then combine (librsvg):
rsvg-convert -f pdf -o schematic.pdf sheet1.svg sheet2.svg ...Output is a best-effort reference rendering, not a certified Altium export — some records/properties are unhandled (warnings are printed). Use Altium OutJob exports for release documentation.