Altium scripting with Python

Altium’s Auto-Router is a pain, it doesn’t produce usable results even in trivial scenarios. I had the idea of scripting the routing of my board and found, that Altium supports scripting. However, they do not offer scripting in my preferred language (Python) and running the scripts seems to require Altium to be installed and running, which makes it pretty useless due to the lack of a Linux version of Altium. Looks like I have to hack some file manipulation together myself. So, how does Altium store data?

Altium uses Microsoft’s OLE2 Compound Document format for all it’s documents. I am having problems using the Python library for OLE documents, but Apache offers a Java library, that seems to be working well: org.apache.poi
Therefore for packing and unpacking the documents, I will make use of simple Java applets at first.

At least some of the content of Altium documents is text in a key-value associative manner, therefore it makes sense to use JSON as an intermediary format. Also, because this allows for JavaScript-based EDA tool generation lateron.

What has been done?

What’s to be done next?

  • Working unpacker and re-packer need to be implemented.
  • The combined knowledge of the three projects above should be boiled down into a well-commented library, which parses the JSON into Altium objects, that in turn may then be manipulated by scripts.


5772 mal insgesamt angesehen, 2 mal heute angesehen.
Dieser Beitrag wurde unter Informatik, Technik abgelegt und mit , , , , , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Eine Antwort auf Altium scripting with Python

  1. Pingback: #BlogBlick No. 6 | Plaintron Blog

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.