Cadsoft EAGLE scripts to tweak settings and layers

Vimark made some new scripts to make our life easier. We use Cadsoft Eagle a lot and these scrips automate some of the more boring aspects of design.

You can download all of these from our SVN. Don’t forget our handy Eagle part library and export scripts, and standard partlist reference.

Join the Conversation


  1. Nice,
    I’m still wondering how the new XML Format is going to work out for hacking…
    I tried already once… I had to make a new part with a TQFP-100 package. It would be a pain to write down all these pin-names by clicking around with the mouse and edit them. I vague remember there were some scripts for that too.

    Thanks to XML, I opened the file in a text-editor and voila… I could easily edit the pinnames there and reopen it in eagle all seems nice and working ;)

    Guess we have to wait for the first parser which is able to get all the parameters from an eagle-xml-file and then we can acccess it easily with whatever tools we want.

  2. Good thing is I tried to bind these scripts to a certain hotkeys (In Eagle Option>Assign).
    Then you can add a command like “script %script_directory%script_name.scr”
    Works as I wanted to.

  3. You know there is whole hierarchy of default scripts, menu buttons, key bindings, and ULPs, that can be employed to do all sort of fun things. Eagle will start by running “eagle.scr” from whatever directory you’ve configured to contain scripts. This can then process or include other commands dependent on what type of window you’re in (brd vs sch vs lbr.) Then you can use the “menu” command to put commands into the “text command menu” (rather than duplicates of the GUI buttons. And THOSE commands can run scripts or ULPs (and ULPs “return” script text, essentially.)
    So of these examples, I have equivalents for some in my billw-brd.scr init file that gets run whenever a BRD is opened, and some essentially attached to menu items (“Layers”->Top/Bottom/NoNames/All/etc)

    I think my favorite is a “Grid->Smaller/Bigger” button that runs a ULP that figures out the current grid and halves/doubles it.

    I haven’t done much in terms of binding anything to keystrokes, but you can do that too. The combinations you can make with EAGLE’s base capabilities are … very powerful.

  4. How difficult would it be to change all text on the Names layer to the same font size?

    Every package that I use in Eagle seems to have a different size for the part Name, which ends up looking really dumb on the PCB. At a certain point, I started editing all boards to set the size of the text, but I had been thinking that I should look into writing a script to do this. Next thing I know there’s this handy blog entry. I suppose it should be quite similar to the script that changes all traces to 12 mil.

    1. @rsdio

      The script does only changes the initial trace width to 12mil it cannot change the routed tracks. Should you make a script to change all text with the same size and ratio, it would be super!


  5. >> How difficult would it be to change all text on the Names layer to the same font size?
    Pretty trivial:
    Run smash_all
    display the name layer(s) you want to change.
    group everything.
    Change size/ratio x;
    right click.

    That assumes that all the names are in the names or values layer. If the library designer has put text in other layers, the “smash” command (and smash_all) won’t make it modifiable. In that case you can use one of the silkscreen copy ULPs to move everything as the first step.

    The default text layers that eagle uses (names, values, docu) are less than wonderful. If I really want a silkscreen to be pretty, I use one of the ULP (like silk-new) to copy all the elements to a NEW layer (as primitives; IC boxes become individual line elements. etc), and edit it there.

  6. you can do this in the eagle.scr too, then they’re automatically bound on load.

    Assign F11 ‘display none; display 1 16 17 18 19 20 21 22 23 24 45 51; display -25 -26 -27 -28;’;
    Assign AF11 ‘display none; display 17 20 21 23 27 31 45 51; display -25 -26 -28;’;

Leave a comment

Leave a Reply to WestfW Cancel reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.