Just wanted to post a little update to show how quick and easy it is to knock out some pretty functional tools in an evening with python... and enjoy the benefits of hundreds of throusands of hours of other peoples time coding various modules. All with simple "import x"...
The first pass of the 'Outliner' tool in the video allows saving selections as groups.. effectively acting as a simple explorer of the scene, which I want to add lots more too.
The alignment tools, although they could be done directly in ULP, it would probably take longer and not look half as pretty as directly using Qt myself (rather then the minimal set of wrapped qt bits exposed through the various dlgFunctions() ) - I plan to add an explorer as part of this dialog, so you can switch between any saved groups or selections all within the Alignment tools!
Is it possible to have a console running in Eagle to add/modify/delete stuff on the schematics or boards in a pythonic way?
looks nice. Do you have some code for us?
Is this EAGLE 6 only or will it work with EAGLE 5?
Rob, you still around at all or did you just throw in this tease and leave forever?
I've been trying to hack some python together myself. I'm using PyQt, and I can make up nice graphical menus, but I can't figure out how you created your alignment tool and kept it displayed while having it work. The only thing I know is to create a script file with python and then run the script when I exit. Of course, exit means I'm closing the GUI...
Anybody have any ideas how this works?
I've emailed you all the code. I've not looked at this since I posted those videos, and haven't touched eagle in a while, but I'll stick it on a git repository somewhere when I have a change to orgainise it and write a quick readme.
I dont think it would work. Purely because this whole system relies on Eagle polling what is essentially an HTTP server to send/receive commands to execute, and this ties eagle up while the script is running. You could have an interpreter that you 'connect' and 'disconnect' for sure, but the idea starts to loose its shine. This effort really is a poor mans integration, but for my purposes it does the job. The group manager has definatly been the handiest thing.
Brilliant! Cheers mate!
Robin or Doug,
Would either of you mind sending me the code as well or pointing me to a repo where it may be?
I set up a Bitbucket repo for it. (Private repositories on Bitbucket are free, Github charges for them.) Let me ask Rob what kind of copyright/license he wants to use, and I'll let you know how to get it...
Thank you very much
I would love to get access to this as well.
Count me in as well, please.
And me too please
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()
for instance in Eaglepy.ULSchematic().instances():
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...)