Category:PCB Eagle

Group Administrators: 1 | Group Member: 49 | Group Threads: 77

EAGLE is a scriptable electronic design automation application with schematic capture, printed circuit board layout, auto-router and computer-aided manufacturing features. EAGLE stands for Easily Applicable Graphical Layout Editor. This group will talk about the problems of using PCB software---Eagle.

Thread Reply
How to Create Eagle Scripts Reply 2017-02-13 06:48:48


Leave A Message


Eagle scripts are text files with eagle commands. You use them for automating tasks such as changing the width of all the traces on a board, changing board size, or drawing a specific pattern.

How does eagle scripts work?

To run an eagle script you simply enter “SCRIPT scriptname” (exchange scriptname with the name of the script you want to run) into the Eagle command line.
To be completely honest, I really don’t use scripts much. But I do think they can be really useful, so I am going to try to use them more in the future..

Where to find information about commands?

In a script you can use all the commands that are available to run from the command line. A list of available commands can be found in “Editor Commands” in Eagle’s Help function from the menu.
If you click on one of the commands you will get detailed information about how to use that command and which parameters it accepts.

An example script

Let’s say that we want to create a script to automatically set the board size to 5cm x 5cm. Some of the cheap prototype manufacturers use this size as a standard, so it is convenient to have a script for this.The board size is determined by the board outline which is set by lines in the “20 Dimension” layer. Since these lines does not have any name, we can’t move them with the MOVE command. Therefore I will create a script that creates a new board outline. The old one must be deleted manually before we run the script.

Set grid

First, I need to ensure that we are using a millimeter grid (to be able to set the outline to 50 mm). We use the “GRID” command for this:GRID MM;

Set layer

Then I will select the correct layer. “20 Dimension” is the layers we want, so we can select it by typing:LAYER 20;

Draw lines

Now, all we have to do is to draw four lines that will make up the board outline.
“WIRE 0” means a wire (or line) with a width of 0. Then we define the start and stop point for the line “(0 0) (0 50)”:
WIRE 0 (0 0) (0 50)
WIRE 0 (0 50) (50 50)
WIRE 0 (50 50) (50 0)
WIRE 0 (50 0) (0 0)
Statement: This post is only the personal view of the author and does not represent the opinions of


Leave A Message


Bookmarked.Really helpful.