1 2 3 Previous Next 31 Replies Latest reply: Sep 26, 2014 9:16 PM by CadSoft Guest RSS

Cadsoft Eagle with Python Scripting




I've only started using Eagle a few weeks ago, and as much as I like it, I have found what I consider some pretty fundamental features just missing. As the built in scripting language is extremely restrictive (when compared to a 'real' language like python, lua or ruby), I made an attempt to get python running with Eagle.




The above is a video of a project I have been working on for the pas 3-4 days, which basically involves exposing the Cadsoft ULP and SCR to python (albeit in not the fastest way). But it does allow me to now use 90% of the ULP and all of the SCR directly from python, including the Object Heirarchies, board.grid... schematic... which have all be exposed in a pythonic way.


as an example, to get all the Instances in the schematic..


instances = Eaglepy.ULSchematic().instances()


or loop,


for instance in Eaglepy.ULSchematic().instances():

     print instance.name()




The tools in the video were very quick to knock out.. the slowest bit was figuring out the papers for approximating cubic/quadratic bezier curves with arcs, for the DXF Importer. These should be the first of many tools to come, next on the list is a group manager so I can save my selectsion.


Hopefully when I have had time to test this a bit more I will release the code to the community, along with any tools I have built. for others who might want this funtionality. (something that should be out of the box with proper bindings to a proper language imo...)





1 2 3 Previous Next