EAGLE Help Version 8.1.0 | Copyright © 2017 CadSoft Computer GmbH |
You can also display an editor command's help page by entering
HELP commandreplacing "command" with, e.g., MOVE, which would display the help page for the MOVE command.
Anywhere else, pressing the F1 key will bring up a context sensitive help page for the menu, dialog or action that is currently active.
For detailed information on how to get started with EAGLE please read the following help pages:
The following editor commands can be used to customize the way EAGLE works. They can be given either directly from an editor window's command line, or in the eagle.scr file.
Command menu | MENU command..; | |
Assign keys | ASSIGN function_key command..; | |
Snap function | SET SNAP_LENGTH number; | |
SET CATCH_FACTOR value; | ||
SET SELECT_FACTOR value; | ||
Content of menus | SET USED_LAYERS name | number; | |
SET WIDTH_MENU value..; | ||
SET DIAMETER_MENU value..; | ||
SET DRILL_MENU value..; | ||
SET SMD_MENU value..; | ||
SET SIZE_MENU value..; | ||
SET ISOLATE_MENU value..; | ||
SET SPACING_MENU value..; | ||
SET MITER_MENU value..; | ||
SET DLINE_WIDTH_MENU value..; | ||
SET DLINE_EXT_WIDTH_MENU value..; | ||
SET DLINE_EXT_LENGTH_MENU value..; | ||
SET DLINE_EXT_OFFSET_MENU value..; | ||
Bend for wires, lines | SET WIRE_BEND bend_nr; | |
Beep on/off | SET BEEP OFF | ON; |
Color for grid lines | SET COLOR_GRID color; | |
Color for layer | SET COLOR_LAYER layer color; | |
Fill style for layer | SET FILL_LAYER layer fill; | |
Grid parameter | SET MIN_GRID_SIZE pixels; | |
Min. text size displayed | SET MIN_TEXT_SIZE size; | |
Display of net lines | SET NET_LINE_WIDTH width; | |
Display of pads | SET DISPLAY_MODE REAL | NODRILL; | |
SET PAD_NAMES OFF | ON; | ||
Display of bus lines | SET BUS_LINE_WIDTH width; | |
DRC fill style | SET DRC_FILL fill_name; | |
Polygon processing | SET POLYGON_RATSNEST OFF | ON; | |
Vector font | SET VECTOR_FONT OFF | ON; |
Package check | SET CHECK_CONNECTS OFF | ON; | |
Grid parameters | GRID options; | |
Replace mode | SET REPLACE_SAME NAMES | COORDS; | |
UNDO Buffer | SET UNDO_LOG OFF | ON; | |
Wire/Line Optimizing | SET OPTIMIZING OFF | ON; | |
Net wire termination | SET AUTO_END_NET OFF | ON; | |
Automatic junctions | SET AUTO_JUNCTION OFF | ON; |
Pad shape | CHANGE SHAPE shape; | |
Wire width | CHANGE WIDTH value; | |
Pad/via diameter | CHANGE DIAMETER diameter; | |
Pad/via/hole drill diam. | CHANGE DRILL value; | |
Smd size | CHANGE SMD width height; | |
Text height | CHANGE SIZE value; | |
Text thickness | CHANGE RATIO ratio; | |
Text font | CHANGE FONT font; | |
Text alignment | CHANGE ALIGN align; | |
Polygon parameter | CHANGE THERMALS OFF | ON; | |
Polygon parameter | CHANGE ORPHANS OFF | ON; | |
Polygon parameter | CHANGE ISOLATE distance; | |
Polygon parameter | CHANGE POUR SOLID | HATCH | CUTOUT; | |
Polygon parameter | CHANGE RANK value; | |
Polygon parameter | CHANGE SPACING distance; | |
Dimension type | CHANGE DTYPE value; |
eagle [ options [ filename [ layer ] ] ]Under Windows EAGLE is also available as a console application (see below).
-Axxx | Assembly variant | |
-Cxxx | execute the given Command | |
-Dxxx | Draw tolerance (0.1 = 10%) | |
-Exxx | Drill tolerance (0.1 = 10%) | |
-Fxxx | Flash tolerance (0.1 = 10%) | |
-N- | no command line prompts | |
-O+ | Optimize pen movement | |
-Pxxx | plotter Pen (layer=pen) | |
-Rxxx | drill Rack file | |
-Sxxx | Scriptfile | |
-Uxxx | User settings file | |
-Wxxx | aperture Wheel file | |
-X- | eXecute CAM Processor | |
-c+ | positive Coordinates | |
-dxxx | Device (-d? for list) | |
-e- | Emulate apertures | |
-f+ | Fill pads | |
-hxxx | page Height (inch) | |
-m- | Mirror output | |
-oxxx | Output filename | |
-pxxx | Pen diameter (mm) | |
-q- | Quick plot | |
-r- | Rotate output 90 degrees | |
-sxxx | Scale factor | |
-u- | output Upside down | |
-vxxx | pen Velocity | |
-wxxx | page Width (inch) | |
-xxxx | offset X (inch) | |
-yxxx | offset Y (inch) |
where xxx means that further data, e.g. a file name or a decimal number needs to be appended to the option character (without space or separated by a space), as in
-Wmywheel.whl -W mywheel.whl -e Aperture emulation on -e+ dto. -e- Aperture emulation offFor flag options, a '-' means that the option is off by default, while '+' means it is on by default.
Flag options (e.g. -e) can be used without repeating the '-' character:
-ecfm | Aperture emulation on, positive oordinates on, fill pads on | |
-ec-f+ | Aperture emulation on, positive oordinates off, fill pads on |
![]() | On Windows it is stored in the file eaglerc.usr under the directory that is defined by the registry key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\AppData" if no environment variable named HOME is defined. |
If a '-' sign is given as the file name, as in -U-, no eaglerc file will be read or written.
-D0.10 | adjusts the draw tolerance to ±10% | |
-D+0.1 -D-0.05 | adjusts the draw toleranceto +10% and -5% |
eagle -C "window (1 1) (2 2);" myboard.brdEAGLE will load the given file and execute the command as if it had been typed into the editor window's command line.
The following conditions apply for the '-C' option:
eagle -C ""Note that in this special case there must be a blank between the option character and the quotes, so that the program will see the explicitly empty string. There also doesn't have to be a file name here, because no command will actually be executed.
Important note on closing:
Wherever coordinates or sizes (like width, diameter etc.) can be entered, they may
be given with units, as in 50mil or 0.8mm. If no unit is given, the current grid unit is used.
Please always close first EAGLE before closing the console!
Closing the console first leads to an uncontrolled shutdown of EAGLE with loss of unsaved
changes etc. The same problem occurs if you close the EAGLE windows as a group or explicitely
the console window via the taskbar.
Quick Introduction
For a quick start you should know more about the following topics:
Control Panel and Editor Windows
From the Control Panel you can open schematic,
board, or library editor windows by using the File menu or double clicking
an icon.
Entering Parameters and Values
Parameters and values can be entered in the EAGLE command line
or, more conveniently, in the Parameter Toolbars which appear when a
command is activated. As this is quite self-explanatory, the help text
does not explicitly mention this option at other locations.
Drawing a Schematic
Create a Schematic File
Use File/New and Save as to create a schematic with a name of your
choice.
Load a Drawing Frame
Load library FRAMES with USE and place a frame of your choice with ADD.
Place Symbols
Load appropriate libraries with USE and place symbols (see ADD, MOVE,
DELETE, ROTATE, NAME, VALUE). Where a particular component is not
available, define a new one with the library editor.
All the components, together with their connections drawn as airwires, appear beside a blank board ready for placing. Power pins are automatically connected to the appropriate supply (if not connected by a net on the schematic).
The board is linked to the schematic via Forward&Back Annotation. This mechanism makes sure that schematic and board are consistent. When editing a drawing, board and schematic must be loaded to keep Forward&Back Annotation active.
To start, open a library. Use the File menu Open or New command (not the USE command).
Click the Edit Package icon and edit a new package by typing its name in the New field of the dialog box.
Set the proper distance GRID.
Add texts >NAME and >VALUE with the TEXT command (show actual name and value in the board) and draw package outlines (LINE command) in the proper layers.
Click the Edit Symbol icon and edit a new symbol by typing its name in the New field of the dialog box.
Place and name pins with the commands PIN and NAME and provide pin parameters (CHANGE).
Add texts >NAME and >VALUE with the TEXT command (show actual name and value in the schematic) and draw symbol outlines (LINE command) in the proper layers.
Click the Edit Device icon and edit a new device by typing its name in the New field of the dialog box.
Assign the package with the PACKAGE command.
Add the gate(s) with ADD, you can have as many gates as needed.
Use CONNECT to specify which of the packages pads are connected to the pins of each gate.
Save the library and you can USE it from the schematic or board
editor.
Control Panel
The Control Panel is the top level window of EAGLE.
It contains a tree view on the left side, and an information window on the right side.
Directories
The top level items of the tree view represent the various types of EAGLE files.
Each of these can point to one or more directories that contain files of that type.
The location of these directories can be defined with the directories dialog.
If a top level item points to a single directory, the contents of that directory will
appear if the item is opened (either by clicking on the little symbol to the left, or by
double clicking the item). If such an item points to more directories, all of these
directories will be listed when the item is opened.
Directories | a file named DESCRIPTION in that directory | |
Libraries | the description of the library | |
Devices | the description of the device | |
Packages | the description of the package | |
Design Rules | the description of the design rules file | |
User Language Programs | the text defined with the #usage directive | |
Scripts | the comment at the beginning of the script file | |
CAM Jobs | the description of the CAM job |
New | create a new file | |
Open | open an existing file | |
Open recent projects | open a recently used project | |
Save all | save all modified editor files | |
Close project | close the current project | |
Exit | exit from the program |
Refresh | refresh the contents of the tree view | |
Search in tree | search in the contents of the tree view (see below) | |
Sort | change the sorting of the tree view |
Directories... | opens the directories dialog | |
Backup... | opens the backup dialog | |
User interface... | opens the user interface dialog | |
Window positions... | opens the window positions dialog |
Control Panel | switch to the Control Panel | |
1 Schematic - ... | switch to window number 1 | |
2 Board - ... | switch to window number 2 |
General | opens a general help page | |
Context | opens the help page for the current context | |
Control Panel | opens the help page you are currently looking at | |
Check for Update | checks if a new version of EAGLE is available | |
About EAGLE | displays details on your EAGLE version and license |
Printing a file through this context menu option will always print the file
as it is on disk, even if you have an open editor window in which you have
modified the file! Use the PRINT command to
print the drawing from an open editor window.
Please note that polygons in boards will not be automatically calculated
when printing via the context menu! Only the outlines will be drawn.
To print polygons in their calculated shape you have to load the drawing
into an editor window, enter RATSNEST
and then PRINT.
All entries may contain one or more directories, separated by a colon (':'), in which to look for the various types of files.
![]() | On Windows the individual directory names are separated by a semicolon (';'). |
The special variables $HOME and $EAGLEDIR can be used to reference the user's home directory and the EAGLE program directory, respectively.
![]() | On Windows the value of $HOME is either that of the environment variable HOME (if set), or the value of the registry key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal", which contains the actual name of the "My Documents" directory. |
Pulldown menu | activates the pulldown menu at the top of the editor window | |
Action toolbar | activates the action toolbar containing buttons for "File", "Print" etc. | |
Parameter toolbar | activates the dynamic parameter toolbar, which contains all the parameters that are available for the currently active command | |
Command buttons | activates the command buttons | |
Command texts | activates the textual command menu | |
Sheet thumbnails | aktivates the sheet thumbnail preview |
Background | selects a black, white or colored background for the layout mode | |
Cursor | selects a small or large cursor for the layout mode |
Background | selects a black, white or colored background for the schematic mode | |
Cursor | selects a small or large cursor for the schematic mode |
New drawings | selects the reading direction of vertical texts in newly created drawings | |
This drawing | selects the reading direction of vertical texts in the currently loaded drawing |
Bubble help | activates the "Bubble Help" function, which pops up a short hint about the meaning of several buttons when moving the cursor over them | |
User guidance | activates the "User Guidance" function, which displays a helping text telling the user what would be the next meaningful action when a command is active |
Always vector font | always displays texts in drawings with the builtin vector font, regardless of which font is actually set for a particular text | |
Mouse wheel zoom | defines the zoom factor that will be used to zoom in and out of an editor window when the mouse wheel is turned ('0' disables this feature, the sign of this value defines the direction of the zoom operation) |
You can also delete all stored window positions, so that the window manager
can decide again where to place newly opened windows.
The Configure button opens a dialog in which you can specify if and
how often a check for new versions should be done automatically upon program
start (by default it checks once per day). If you need to use a proxy to access
the Internet, this can also be specified in the configuration dialog. In the "Host"
field enter the full name of the proxy host, without any
http:// prefix, and enter an optional port number in the "Port" field.
If you would like to be informed about beta versions of EAGLE, you can check
the "Also check for beta versions" box.
Check for Update
The option "Help/Check for Update" in the Control Panel's pulldown menu opens
a dialog that displays whether there is a new version of EAGLE available on
the CadSoft server.
Keyboard and Mouse
The modifier keys (Alt, Ctrl and Shift) are used
to modify the behavior of certain mouse actions.
Note that depending on which operating system or window manager you use, some of these
keys (in combination with mouse events) may not be delivered to applications, which means
that some of the functions described here may not be available.
Alt
Pressing the Alt key switches to an alternate GRID.
This can typically be a finer grid than the normal one, which allows you to quickly
do some fine positioning in a dense area, for instance, where the normal grid might
be too coarse.
The alternate grid remains active as long as the Alt key is held pressed down.
Ctrl
Pressing the Ctrl key while clicking on the right mouse button toggles
between corresponding wire bend styles (only applies to commands that support wire
bend styles, like, for instance, LINE).
The Ctrl key together with the left mouse button controls special functionality of individual commands, like, for instance, selecting an object at its origin with the MOVE command.
If a command can select a group, the Ctrl key must be pressed together with the right mouse button when selecting the group (otherwise a context menu for the selected object would be opened).
![]() | On Mac OS X the Cmd key has to be used instead of the Ctrl key. |
The Shift key together with the left mouse button controls special functionality of individual commands, like, for instance, deleting a higher level object with the DELETE command.
The following commands support the center mouse button:
ADD | mirror part | |
ARC | change active layer | |
CIRCLE | change active layer | |
COPY | mirror object | |
INVOKE | mirror gate | |
LABEL | change active layer | |
MOVE | mirror object or group | |
PASTE | mirror group | |
POLYGON | change active layer | |
RECT | change active layer | |
ROUTE | change active layer | |
SMD | change active layer | |
TEXT | change active layer | |
LINE | change active layer |
Click&Drag with the center mouse button will pan the drawing within the editor window.
When selecting an object with the right mouse button, a context specific popup menu is displayed from which commands that apply to this object can be selected. If there is currently a command active that can be applied to a group, the popup menu will contain an entry for this.
The following commands support the right mouse button:
ADD | rotate part | |
ARC | change direction of arc | |
BUS | change wire bend | |
CHANGE | apply change to group | |
DELETE | delete group | |
GROUP | close polygon | |
INVOKE | rotate gate | |
LABEL | rotate label | |
MIRROR | mirror group | |
MOVE | rotate object, select group | |
NET | change wire bend | |
PAD | rotate pad | |
PASTE | rotate group | |
PIN | rotate pin | |
POLYGON | change wire bend | |
RIPUP | ripup group | |
ROTATE | rotate group | |
ROUTE | change wire bend | |
SMD | rotate smd | |
SPLIT | change wire bend | |
TEXT | rotate text | |
LINE | change wire bend |
Select highlighted object? (left=yes, right=next, ESC=cancel)
indicates that you can now choose one of these objects.
Press the right mouse button to switch to the next object.
Press the left mouse button to select the highlighted object.
Press Esc to cancel the selection procedure.
The command
SET Select_Factor select_radius;defines the selection radius.
If the original selection was done with the right mouse button, a context specific
popup menu will be displayed which applies to the first selected object, and which
contains "Next" as the first entry. Clicking on this entry will cyclically switch
through the objects within the selection radius.
Editor Windows
EAGLE knows different types of data files, each of which has its own
type of editor window. By double clicking on one of the items in the
Control Panel or by selecting a file from the
File/Open menu, an editor
window suitable for that file will be opened.
After opening a new library editor window, the edit area will be empty and
you will have to use the EDIT command to select
which package, symbol or device you want to edit or create.
Package: the package definition.
Symbol: the symbol as it appears in the circuit diagram.
Device: definition of the whole component. Contains one or more
package variants and one or several symbols (e.g. gates).
The symbols can be different from each other.
Click on the Dev, Pac or
Sym button to select Device, Packages or Symbols,
respectively.
If you want to create a new object, write the name of the new object into
the New field. You can also edit an existing object
by typing its name into this field. If you omit the extension, an object
of the type indicated by the Choose... prompt will be
loaded. Otherwise an object of the type indicated by the extension will
be loaded.
If your license does not include
the Schematic Module, the object type buttons (Dev...)
will not appear in the menu.
When there is a schematic file (*.sch) with the same name as the
board file (in the same directory), opening a board editor window will
automatically open a Schematic Editor
window containing that file and will put it on the desktop
as an icon. This is necessary to have the schematic file loaded when editing
the board causes modifications that have to be
back-annotated
to the schematic.
When there is a board file (*.brd) with the same name as the
schematic file (in the same directory), opening a schematic editor window will
automatically open a Board Editor
window containing that file and will put it on the desktop
as an icon. This is necessary to have the board file loaded when editing
the schematic causes modifications that have to be
forward-annotated
to the board.
The combo box in the action toolbar of the schematic editor window allows
you to switch between the various sheets of the schematic, or to add new
sheets to the schematic (this can also be done using the
EDIT command).
The text must be a pure ASCII file and must not contain any control codes.
The main area of use for the text editor is writing
User Language Programs and
Script files.
Within that command the following placeholders will be replaced with
actual values:
Edit Library Object
In library edit mode you can edit packages, symbols, and devices.
Board Editor
The Board Editor is used to edit a board (*.brd).
Schematic Editor
The Schematic Editor is used to edit a schematic (*.sch).
Text Editor
The Text Editor is used to edit any kind of text.
Using an external text editor
If you prefer to use an external text editor instead of EAGLE's builtin text
editor, you can specify the command necessary to start that editor in the
"Options/User interface" dialog.
%C | the column in which to place the cursor (currently always 1) | |
%F | the name of the file to load | |
%L | the line in which to place the cursor |
If the command consists only of a hyphen ('-'), EAGLE will never open a text editor window. This may be useful for people who always start their text editor by themselves.
The following restrictions apply when using an external text editor:
CLOSE | Close drawing after editing | |
EDIT | Load/create a drawing | |
EXPORT | Generate ASCII list (e.g. netlist) | |
OPEN | Open library for editing | |
QUIT | Quit EAGLE | |
REMOVE | Delete files/library elements | |
SCRIPT | Execute command file | |
USE | Load library for placing elements | |
WRITE | Save drawing/library |
ADD | Add element to drawing/symbol to device | |
ARC | Draw arc | |
ATTRIBUTE | Define attributes | |
CIRCLE | Draw circle | |
CLASS | Define net classes | |
COPY | Copy objects/elements | |
CUT | Cut previously defined group | |
DELETE | Delete objects | |
DESCRIPTION | Change an object's description | |
GROUP | Define group for upcoming operation | |
HOLE | Define non-conducting hole | |
LAYER | Create/change layer | |
LINE | Draw line or routed track | |
MIRROR | Mirror objects | |
MITER | Miter wire/line joints | |
MODULE | Create module and add module instances | |
MOVE | Move or rotate objects | |
NAME | Name object | |
PASTE | Paste previously cut group to a drawing | |
PORT | Add port to module | |
POLYGON | Draw polygon | |
RECT | Draw rectangle | |
ROTATE | Rotate objects | |
SLICE | Split lines | |
SMASH | Prepare NAME/VALUE text for moving | |
SPLIT | Bend wires/lines (tracks, nets, etc.) | |
TEXT | Add text to a drawing | |
VALUE | Enter/change value for component |
DRC | Perform design rule check | |
ERRORS | Show DRC errors | |
LOCK | Lock component's position | |
RATSNEST | Show shortest air lines | |
REPLACE | Replace component | |
RIPUP | Ripup routed track | |
ROUTE | Route signal | |
SIGNAL | Define signal (air line) | |
VIA | Place via-hole |
BOARD | Create a board from a schematic | |
BUS | Draw bus line | |
ERC | Perform electrical rule check | |
GATESWAP | Swap equivalent 'gates' | |
INVOKE | Add certain 'gate' from a placed device | |
JUNCTION | Place connection point | |
LABEL | Provide label to bus or net | |
NET | Define net | |
PINSWAP | Swap equivalent pins |
CONNECT | Define pin/pad assignment | |
PACKAGE | Define package for device | |
PAD | Add pad to a package | |
PIN | Add pin to a symbol | |
PREFIX | Define default prefix for device | |
REMOVE | Delete library elements | |
RENAME | Rename symbol/package/device | |
SMD | Add smd pad to a package | |
TECHNOLOGY | Define technologies for a device | |
VALUE | Define if value text can be changed |
ASSIGN | Assign keys | |
CHANGE | Change parameters | |
DISPLAY | Display/hide layers | |
GRID | Define grid/unit | |
MENU | Configure command menu | |
SET | Set program parameters | |
WINDOW | Choose screen window |
AUTO | Start Autorouter | |
HELP | Show help page | |
INFO | Show information about object | |
MARK | Set/remove mark (for measuring) | |
OPTIMIZE | Optimize (join) wire segments | |
Print to the system printer | ||
REDO | Redo commands | |
RUN | Run User Language Program | |
SHOW | Highlight object | |
UNDO | Undo commands | |
UPDATE | Update library objects |
Commands and parameters in CAPITAL LETTERS are entered directly (or selected in the command menu with the mouse). For the input there is no difference between small and capital letters.
Parameters in lowercase letters are replaced by names, number values or key words. Example:
Syntax: | GRID grid_size grid_multiple; | |
Input: | GRID 1 10; |
Syntax: | SET BEEP OFF | ON; | |
Input: | SET BEEP OFF; | |
or | ||
SET BEEP ON; |
Syntax: | DISPLAY option layer_name.. | |
Input: | DISPLAY TOP PINS VIAS |
Syntax: | MOVE .. | |
Input: | MOVE | |
Mouse click on the first element to be moved | ||
Mouse click on the target position | ||
Mouse click on the second element to be moved | ||
etc. |
This example also explains the meaning of the repetition points for commands with mouse clicks.
For the program each mouse click is the input of a coordinate. If coordinates are to be entered as text, the input via the keyboard must be as follows:
(x y)x and y are numbers in the unit which has been selected with the GRID command. The input as text is mainly required for script files.
(100mil 200mil)Allowed units are mm, mic, mil and in. It is possible to use different units for x and y.
(@)can be used to reference the current position of the mouse cursor within the draw window. For example, the input
MOVE R1 (@)would move the part named R1 to the place currently pointed to with the mouse.
Any combination of the following modifiers may follow the opening brace in order to simulate a particular key that is held pressed with the "mouse click" or to change the type of coordinates:
> | right mouse button click | |
A | Alt key | |
C | Ctrl key | |
P | Polar coordinates (relative to the mark, x = radius, y = angle in degrees, counterclockwise) | |
R | Relative coordinates (relative to the mark) | |
S | Shift key |
(CR> 1 2)would result in a "right button mouse click" at (1 2) relative to the mark, with the Ctrl key held down (of course what happens with this kind of input will depend on the actual command). Note that if there is currently no mark defined, coordinates with R or P will be relative to the drawing's origin. Also, the modifier characters are not case sensitive, their sequence doesn't matter and there doesn't have to be a blank between them and the first coordinate digit. So the above example could also be written as (r>c1 2). Values entered as "polar coordinates" will be stored internally as the corresponding pair of (x y) coordinates.
As an example for entering coordinates as text let's assume you wish to enter the exact dimensions for board outlines:
GRID 1 MM; CHANGE LAYER DIMENSION; LINE 0 (0 0) (160 0) (160 100) (0 100) (0 0); GRID LAST;
WINDOW;redraws the drawing window, whereas
WINDOW FITscales the drawing to fit entirely into the drawing window. There is no semicolon necessary here because it is already clear that the command is complete.
The ADD command fetches a circuit symbol (gate) or a package from the active library and places it into the drawing.
During device definition the ADD command fetches a symbol into the device.
Usually you click the ADD command and select the package or symbol from the menu which opens. If necessary, parameters can now be entered via the keyboard.
If device_name contains wildcard characters ('*' or '?') and more than one device matches the pattern, the ADD dialog will be opened and the specific device can be selected from the list. Note that the Description checkbox in the ADD dialog will be unchecked after any ADD command with a device_name has been given in the command line, no matter if it contains wildcards or not. This is because a device_name entered in the command line is only searched for in the device names, not in the descriptions.
The package or symbol is placed with the left button and rotated with the right button. After it has been placed another copy is immediately hanging from the cursor.
If there is already a device or package with the same name (from the same library) in the drawing, and the library has been modified after the original object was added, an automatic library update will be started and you will be asked whether objects in the drawing shall be replaced with their new versions. Note: You should always run a Design Rule Check (DRC) and an Electrical Rule Check (ERC) after a library update has been performed!
To add directly from a specific library, the command syntax
ADD devicename@librarynamecan be used. devicename may contain wildcards and libraryname can be either a plain library name (like "ttl" or "ttl.lbr") or a full file name (like "/home/mydir/myproject/ttl.lbr" or "../lbr/ttl"). In case of blanks in the file name the whole expression has to be enclosed by apostrophs (like ADD 'DEV1A@/home/my dir/ttl.lbr').
Example:
ADD DIL14 IC1 fetches the DIL14 package to the board and gives it the name IC1.
If no name is given in the schematic, the gate will receive the prefix that was specified in the device definition with PREFIX, expanded with a sequential number (e.g. IC1).
Example:
ADD 7400 This will place a sequence of five gates from 7400 type components. Assuming that the prefix is defined as "IC" and that the individual gates within a 7400 have the names A..D, the gates in the schematic will be named IC1A, IC1B, IC1C, IC1D, IC2A. (If elements with the same prefix have already been placed the counting will proceed from the next sequential number.) See also INVOKE.
While an object is attached to the cursor, you can change the name under which it will be added to the drawing. This allows you to add several parts of the same type, but with different, explicitly defined names:
Example:
ADD CAP C1 C5 C7
Example:
ADD 7400 IC1 A This is mainly useful if a schematic is to be generated through a script. Note that if a particular gate is added, no other gates with add level MUST or ALWAYS will be fetched automatically, and you will have to use the INVOKE command to invoke at least the MUST gates (otherwise the Electrical Rule Check will report them as missing).
[S][M]Rnnn
S | sets the Spin flag, which disable keeping texts readable from the bottom or right side of the drawing (only available in a board context) | |
M | sets the Mirror flag, which mirrors the object about the y-axis | |
Rnnn | sets the Rotation to the given value, which may be in the range 0.0...359.9 (at a resolution of 0.1 degrees) in a board context, or one of 0, 90, 180 or 270 in a schematic context (angles may be given as negative values, which will be converted to the corresponding positive value) |
The key letters S, M and R may be given in upper- or lowercase, and there must be at least R followed by a number.
If the Mirror flag is set in an element as well as in a text within the element's package, they cancel each other out. The same applies to the Spin flag.
Examples:
R0 | no rotation | |
R90 | rotated 90° counterclockwise | |
R-90 | rotated 90° clockwise (will be converted to 270°) | |
MR0 | mirrored about the y-axis | |
SR0 | spin texts | |
SMR33.3 | rotated 33.3° counterclockwise, mirrored and spin texts |
Default: R0
ADD DIL16 R90 (0 0);places a 16-pin DIL package, rotated 90 degrees counterclockwise, at coordinates (0 0).
0: | The symbol (gate) can not be swapped with any other in the schematic. | |
>0 | The symbol (gate) can be swapped with any other symbol of the same type in the schematic that has the same swaplevel (including swapping between different devices). |
Default: 0
Next | If a device has more than one gate, the symbols are fetched into the schematic with Addlevel Next. | |
Must | If any symbol from a device is fetched into the schematic, then a symbol defined with Addlevel Must must also appear. This happens automatically. It cannot be deleted until all the other symbols in the device have been deleted. If the only symbols remaining from a device are Must-symbols, the DELETE command will delete the entire device. | |
Always | Like Must, although a symbol with Addlevel Always can be deleted and brought back into the schematic with INVOKE. | |
Can | If a device contains Next-gates, then Can-gates are only fetched if explicitly called with INVOKE. A symbol with Addlevel Can is only then fetched into the schematic with ADD if the device only contains Can-gates and Request-gates. | |
Request | This property is usefully applied to devices' power-symbols. Request-gates can only be explicitly fetched into the schematic (INVOKE) and are not internally counted. The effect of this is that in devices with only one gate and one voltage supply symbol, the gate name is not added to the component name. In the case of a 7400 with four gates (plus power supply) the individual gates in the schematic are called, for example, IC1A, IC1B, IC1C and IC1D. A 68000 with only one Gate, the processor symbol, might on the other hand be called IC1, since its separate voltage supply symbol is not counted as a gate. |
Example:
ADD PWR 0 REQUEST fetches the PWR symbol (e.g. a power pin symbol), and defines a Swaplevel of 0 (not swappable) and the Addlevel Request for it.
The ARC command, followed by three mouse clicks on a drawing, draws an arc of defined width. The first point defines a point on a circle, the second its diameter. Entering the second coordinate reduces the circle to a semi-circle, while the right button alters the direction from first to second point. Entry of a third coordinate truncates the semi-circle to an arc extending to a point defined by the intersection of the circumference and a line between the third point and the arc center.
The parameters CW and CCW enable you to define the direction of the arc (clockwise or counterclockwise). ROUND and FLAT define whether the arc endings are round or flat, respectively.
CHANGE WIDTH width;The adjusted width is identical to the line width for wires.
Arcs with angles of 0 or 360 degrees or a radius of 0 are not accepted.
Example for text input:
GRID inch 1; ARC CW (0 1) (0 -1) (1 0);generates a 90-degree arc with the center at the origin.
function_key = modifier+key
modifier = any combination of S (Shift), C (Control), A (Alt) and M (Cmd, Mac OS X only)
key = F1..F12, A-Z, 0-9, BS (Backspace)
The ASSIGN command can be used to define the meaning of the function keys F1 thru F12, the letter keys A thru Z, the (upper) digit keys 0 thru 9 and the backspace key (each also in combination with modifier keys).
The ASSIGN command without parameters displays the present key assignments in a dialog, which also allows you to modify these settings.
Keys can be assigned a single command or multiple commands. The command sequence to be assigned should be enclosed in apostrophes.
If key is one of A-Z or 0-9, the modifier must contain at least A, C or M.
![]() | The M modifier is only available on Mac OS X. |
Please note that any special operating system function assigned to a function
key will be overwritten by the ASSIGN command.
Depending on the operating system, ASSIGN may not be able to overwrite
certain function keys (like e.g. Shift+F10 on Windows).
If you assign to a letter key together with the modifier A,
(e.g. A+F), a corresponding hotkey from the pulldown menu is
no longer available.
To remove an assignment from a key you can enter ASSIGN with only the function_key code, but no command.
ASSIGN F7 'change layer top; route'; ASS A+F7 'cha lay to; rou'; ASSIGN C+F10 menu add mov rou ''';''' edit; ASSIGN CA+R 'route';The first two examples have the same effect, since EAGLE allows abbreviations not only with commands but also with parameters (as long as they are unmistakable).
Please note that here, for instance, the change layer top command is terminated by a semicolon, but not the route command. The reason is that in the first case the command already contains all the necessary parameters, while in the second case coordinates still have to be added (usually with the mouse). Therefore the ROUTE command must not be deactivated by a semicolon.
F1 HELP | Help function | |
Alt+F2 WINDOW FIT | The whole drawing is displayed | |
F2 WINDOW; | Screen redraw | |
F3 WINDOW 2 | Zoom in by a factor of 2 | |
F4 WINDOW 0.5 | Zoom out by a factor of 2 | |
F5 WINDOW (@); | Cursor pos. is new center | |
F6 GRID; | Grid on/off |
Further, many useful key assignments are contained in the initialisation script default-assign.scr
and can be adjusted to your individual needs.
ATTRIBUTE
See also TECHNOLOGY,
NAME,
VALUE,
SMASH,
TEXT
ATTRIBUTE part_name attribute_name
ATTRIBUTE part_name attribute_name 'attribute_value' [ [ orientation ] ]
ATTRIBUTE part_name attribute_name DELETE
ATTRIBUTE element_name attribute_name
ATTRIBUTE element_name attribute_name 'attribute_value' [ [ orientation ] ]
ATTRIBUTE element_name attribute_name DELETE
ATTRIBUTE * [ name [ 'value' ] ]
ATTRIBUTE * name DELETE
ATTRIBUTE ..
See the description of orientation at ADD.
An attribute is an arbitrary combination of a name and a value, that can be used to specify any kind of information for a given part.
Attributes can be defined in the library (for individual devices), in the schematic (for an actual part) or in the board (for an actual element). Attributes defined on the device level will be used for every part of that device type in the schematic. In a schematic, additional attributes can be defined for each part, and existing attributes from the devices can be overwritten with new values (if the attributes have been defined as variable). An element in the board has all the attributes of its corresponding part, and can have further attributes of its own.
ATTRIBUTE name [ 'value' ] [ options ]The name may consist of any letters, digits, '_', '#' and '-' and may have any length; the first character must not be '-', though. Names are treated case insensitive, so PartNo is the same as PARTNO. The value may contain any characters and must be enclosed in single quotes.
The valid options are:
delete | Delete the attribute with the given name from all technology variants (in this case there must be no 'value'). | |
variable | Mark this attribute as variable, so that it can be overwritten in the schematic (this is the default). | |
constant | Attributes marked as constant cannot be overwritten in the schematic (unless the user insists). |
An already existing attribute can be switched between variable and constant without the need to repeat its value, as in
ATTRIBUTE ABC '123' | (variable by default) | |
ATTRIBUTE ABC constant | (ABC retains its value '123') |
Selecting the ATTRIBUTE command and clicking on a part shows a dialog in which all attributes of that part are listed and can be edited.
For a fully textual definition of a new attribute the following syntax can be used:
ATTRIBUTE part_name attribute_name 'attribute_value' orientation
For already existing attributes it's only possible to change the value; the following syntax has to be used:
ATTRIBUTE part_name attribute_name 'attribute_value';Note that in case of a multi-gate part, actually one of the gates (i.e. "instances") is selected. When selecting it via a mouse click it is already clear which gate is meant, while when selecting it via part_name, the full name consisting of the part and gate name should be given. While a specific part can only have one attribute with a given name, the attribute can be attached to any or all of its gates. If only the part name is given, the first visible gate will be implicitly selected.
If no coordinates are given (and the command is terminated with a ';'), the behavior depends on whether the given attribute already exists for that part (either in the device or in the schematic). If the attribute already exists, only its value will be changed. If it doesn't exist yet, a new attribute with the given name and value will be placed at the origin of the selected gate of the part.
To delete an attribute from a part, the command
ATTRIBUTE part_name attribute_name DELETEcan be used.
When defining attributes via the command line or a script, use the CHANGE DISPLAY command to define which parts of the attribute (name, value, both or none of these) shall be visible.
If in a board the graphical representation of an attribute of an element is deleted and the attribute is defined solely in the board or there is no consistent schematic, the attribute is deleted too. In any other case the attribute is not deleted, but its display mode is changed to OFF (not visible).
Such an attribute could for instance be the author of a drawing, and can be used in the title block of a drawing's frame. It will be shown on every schematic sheet that has a drawing frame that contains a text variable with the same name.
The attribute name _EXTERNAL_ is reserved for marking of external devices (see PACKAGE).
LAYER layer; LINE (1 2) (3 4);doesn't work here. The layer needs to be selected while the ATTRIBUTE command is already active, which can be done like this
ATTRIBUTE parameters LAYER layer more parameters;Note that the ATTRIBUTE line is not terminated with a ';', and that the LAYER command starts on a new line.
ATTRIBUTE LAYER layer;set the layer to use with subsequent ATTRIBUTE commands.
PACKAGE N; TECHNOLOGY LS; ATTRIBUTE PartNo '12345-ABC'; ATTRIBUTE Temp '100K' constant; ATTRIBUTE Remark 'mount manually';
The AUTO command activates the integrated Autorouter. If signal names are specified or signals are selected with the mouse, only these signals are routed. Without parameters the command will try to route all signals. If a "!" character is specified all signals are routed except the signals following the "!" character. The "!" character must be the first parameter and must show up only once.
The LOAD and SAVE options can be used to load the Autorouter parameters from or save them to the given file. If filename doesn't have the extension ".ctl" it will be appended automatically.
Without any parameters (or if no terminating ';' is given), the AUTO command opens a dialog in which the parameters that control the routing algorithm can be configured. The special option FOLLOWME opens this dialog in a mode where only the parameters controlling the Follow-me router can be modified.
AUTO ! GND VCC;In every case the semicolon is necessary as a terminator. A menu for adjusting the Autorouter control parameters opens if you select AUTO from the command menu or type in AUTO from the keyboard (followed by Return key).
* | matches any number of any characters | |
? | matches exactly one character | |
[...] | matches any of the characters between the brackets |
If any of these characters shall be matched exactly as such, it has to be enclosed in brackets. For example, abc[*]ghi would match abc*ghi and not abcdefghi.
A range of characters can be given as [a-z], which results in any character in the range 'a'...'z'.
In practice you draw the board outlines into the Dimension layer with the LINE command and place the components within this area.
If you want the Autorouter not to use a layer, select "N/A" in the preferred direction field.
The command BOARD is used to convert a schematic drawing into a board.
If the board already exists, it will be loaded into a board window.
If the board does not exist, you will be asked whether to create that new board. If a grid is given, the parts on the board will be placed in the given raster, as in
BOARD 5mmwhich would place the parts in a 5 millimeter raster (default is 50mil). The number must be given with a unit, and the maximum allowed value is 10mm.
The BOARD command will never overwrite an existing board file. To create a new board file if there is already a file with that name, you have to remove that file first.
edit .brdin the editor window's command line.
All relevant data from the schematic file (name.sch) will be converted to a board file (name.brd). The new board is loaded automatically as an empty card with a size of 160x100mm (Light edition: 100x80mm). All packages and connections are shown on the left side of the board. Supply pins are already connected (see PIN command).
If you need board outlines different to the ones that are generated by default, simply delete the respective lines and use the LINE command to draw your own outlines into the Dimension layer. The recommended width for these lines is 0.
A board file cannot be generated:
The command BUS is used to draw bus connections onto the Bus layer of a schematic diagram. Bus_name has the following form:
SYNONYM:partbus,partbus,..where SYNONYM can be any name. Partbus is either a simple net name or a bus name range of the following form:
Name[LowestIndex..HighestIndex]where the following condition must be met:
0 <= LowestIndex <= HighestIndex <= 511
If a name is used with a range, that name must not end with digits, because it would become unclear which digits belong to the Name and which belong to the range.
If a bus wire is placed at a point where there is already another bus wire, the current bus wire will be ended at that point. This function can be disabled with "SET AUTO_END_NET OFF;", or by unchecking "Options/Set/Misc/Auto end net and bus".
If the curve or @radius parameter is given, an arc can be drawn as part of the bus (see the detailed description in the LINE command).
A[0..15] RESET DB[0..7],A[3..4] ATBUS:A[0..31],B[0..31],RESET,CLOCK,IOSEL[0..1]If no bus name is used, a name of the form B$1 is automatically allocated. This name can be changed with the NAME command at any time.
The line width used by the bus can be defined for example with
SET Bus_Wire_Width 40;to be 40 mil. (Default: 30 mil).
ATBUS:A[0..31],B[0..31],!RESET,CLOCK,IOSEL[0..1]which would result in
_____ ATBUS:A[0..31],B[0..31],RESET,CLOCK,IOSEL[0..1]You can find further details about this in the description of the TEXT command.
Parameters adjusted with the CHANGE command remain as preset properties for objects added later.
All values in the CHANGE command are used according to the actual grid unit.
Layer | CHANGE LAYER name | number | |
Text | CHANGE TEXT [ text ] | |
Text height | CHANGE SIZE value | |
Text thickness | CHANGE RATIO ratio | |
Text line distance | CHANGE LINEDISTANCE value | |
Text font | CHANGE FONT VECTOR | PROPORTIONAL | FIXED | |
Text alignment | CHANGE ALIGN BOTTOM | LEFT | CENTER | TOP | RIGHT | |
Wire width | CHANGE WIDTH value | |
Wire style | CHANGE STYLE value | |
Arc cap | CHANGE CAP ROUND | FLAT | |
Pad shape | CHANGE SHAPE SQUARE | ROUND | OCTAGON | LONG | OFFSET | |
Pad/via/smd flags | CHANGE STOP | CREAM | THERMALS | FIRST OFF | ON | |
Pad/via diameter | CHANGE DIAMETER diameter | |
Pad/via/hole drill | CHANGE DRILL value | |
Via layers | CHANGE VIA from-to | |
Smd dimensions | CHANGE SMD width height | |
Smd roundness | CHANGE ROUNDNESS value | |
Pin parameters | CHANGE DIRECTION NC | IN | OUT | IO | OC | HIZ | SUP | PAS | PWR | |
CHANGE FUNCTION NONE | DOT | CLK | DOTCLK | ||
CHANGE LENGTH POINT | SHORT | MIDDLE | LONG | ||
CHANGE VISIBLE BOTH | PAD | PIN | OFF | ||
CHANGE SWAPLEVEL number | ||
Polygon parameters | CHANGE THERMALS OFF | ON | |
CHANGE ORPHANS OFF | ON | ||
CHANGE ISOLATE distance | ||
CHANGE POUR SOLID | HATCH | CUTOUT | ||
CHANGE RANK value | ||
CHANGE SPACING distance | ||
Gate parameters | CHANGE SWAPLEVEL number | |
CHANGE ADDLEVEL NEXT | MUST | ALWAYS | CAN | REQUEST | ||
Net class | CHANGE CLASS number | name | |
Package | CHANGE PACKAGE part_name [device_name] | 'device_name' [part_name] | |
Technology | CHANGE TECHNOLOGY part_name [device_name] | 'device_name' [part_name] | |
Attribute display | CHANGE DISPLAY OFF | VALUE | NAME | BOTH | |
Frame parameters | CHANGE COLUMS value | |
CHANGE ROWS value | ||
CHANGE BORDER NONE | BOTTOM | RIGHT | TOP | LEFT | ALL | ||
Label | CHANGE XREF OFF | ON | |
Dimension type | CHANGE DTYPE PARALLEL | HORIZONTAL | VERTICAL | RADIUS | DIAMETER | ANGLE | LEADER | |
Dimension unit | CHANGE DUNIT [MIC | MM | MIL | INCH] [OFF | ON] [precision] | |
Dimension line | CHANGE DLINE width [ extension_width [ extension_length [ extension_offset ]]] (extension values can be set to AUTO; unchanged preceding values can be skipped with '-'; see examples) | |
Populate | CHANGE POPULATE OFF | ON (only available in a board context without active f/b annotation) |
CHANGE DLINE 0.1mm;changes dimension line width to 0.1mm. Extension parameters are left unchanged.
CHANGE DLINE 0.2mm - 0.5mm AUTO;changes dimension line width to 0.2mm, extension line length to 0.5mm and extension offset to AUTO. The extension line width is left unchanged.
The CIRCLE command is used to create circles. Circles in the layers tRestrict, bRestrict, and vRestrict define restricted areas. They should be defined with a width of 0.
The width parameter defines the width of the circle's circumference and is the same parameter as used in the LINE command. The width can be changed with the command:
CHANGE WIDTH width;where width is the desired value in the current unit.
A circle defined with a width of 0 will be filled.
The radius of the resulting circle is limited to 1000mm.
GRID inch 1; CIRCLE (0 0) (1 0);generates a circle with a radius of 1 inch and the center at the origin.
The CLASS command is used to define or use net classes.
Without parameters, it offers a dialog in which the net classes can be defined.
If only a number or name is given, the net class with the given number or name is selected and will be used for subsequent NET and SIGNAL commands.
If both a number and a name are given, the net class with the given number will be assigned all the following values and will also be used for subsequent NET and SIGNAL commands. If any of the parameters following name are omitted, the net class will keep its respective value.
If number is negative, the net class with the absolute value of number will be cleared. The default net class 0 can't be cleared.
Net class names are handled case insensitive, so SUPPLY would be the same as Supply or SuPpLy.
Using several net classes in a drawing increases the time the Autorouter needs to do its job. Therefore it makes sense to use only as few net classes as necessary (only the number of net classes actually used by nets or signals count here, not the number of defined net classes).
In order to avoid conflicts when CUT/PASTEing between drawings it makes sense to define the same net classes under the same numbers in all drawings.
Modules are using the same set of net classes as the schematic itself.
If a net of a MODULE has an external connection through a PORT, the net class of the net on this port is overwriting the net class of the net in the module.
The Autorouter processes signals sorted by their total width requirements (Width plus Clearance), starting with those that require the most space. The bus router only routes signals with net class 0.
The net class of an existing net/signal can be changed with the CHANGE command.
CLASS 3 1:0.6mm 2:0.8mmdefines a minimum clearance of 0.6mm between signals in net classes 1 and 3, and one of 0.8mm between signals in net classes 2 and 3. Note that the numbers in number:clearance must be less than or equal to the number of the net class itself ('3' in the above example), so
CLASS 3 1:0.6mm 2:0.8mm 3:0.2mmwould also be valid, whereas
CLASS 3 1:0.6mm 2:0.8mm 3:0.2mm 4:0.5mmwould not be allowed.
A clearance value of '0' between two net classes means, there is no specific
value. Then the higher value of the participating net classes will be used.
CLOSE
See also OPEN,
EDIT,
WRITE,
SCRIPT
The CLOSE command is used to close an editor window. If the drawing you are editing has been modified you will be prompted whether you wish to save it.
This command is mainly used in script files.
CONNECT
See also PREFIX,
OPEN,
CLOSE,
SCRIPT
CONNECT [ ALL | ANY ] gate_name.pin_name pad_name..
CONNECT [ ALL | ANY ] pin_name pad_name..
This command is used in the device editing mode in order to define the relationship between the pins of a gate and the pads of the corresponding package in the library. First of all, it is necessary to define which package is to be used by means of the PACKAGE command.
If the CONNECT command is invoked without parameters, a dialog is presented which allows you to interactively assign the connections.
CONNECT gnd 1 rdy 2 phi1 3 !irq 4 nc1 5...(Note: "!" is used to indicate inverted data signals.)
CONNECT A.I1 1 A.I2 2 A.O 3; CONNECT B.I1 4 B.I2 5 B.O 6; CONNECT C.I1 13 C.I2 12 C.O 11; CONNECT D.I1 10 D.I2 9 D.O 8; CONNECT PWR.gnd 7; CONNECT PWR.VCC 14;In this case, the connections for four NAND gates of a good old 7400 are allocated. The device includes five gates - A, B, C, D, and PWR. The gate inputs are named I1 and I2 while the output is named O.
The CONNECT command can be repeated as often as required. It may be used with all pin/pad connections or with only certain pins. Each new CONNECT command overwrites the previous conditions for the relevant pins.
Note that if you have a large number of connections in a single device, the CONNECT command works a lot faster if all connections are given in one single call, like shown in the example below.
CONNECT ALL I1 '1 3 5'; CONNECT ANY O1 '2 4 6';In the first example the pin I1 is connected to the three pads 1, 3 and 5. If the pin I1 is connected to a net in the schematic, all three pads must be explicitly connected to the corresponding signal in the board.
If a pin name would collide with one of the keywords ALL or ANY, the pin name needs to be enclosed with single quotes. As soon as one of these keywords appears in a CONNECT command, it applies to all pin/pad connections that follow it, until a different keyword is seen, as in
CONNECT 'A' '1' 'B' '2' ANY 'C' '3 4 5 6' 'D' '7 8' ALL 'E' '9 10 11';
The RATSNEST and AUTO command will handle the ALL and ANY cases appropriately.
In the CONNECT dialog the "Connect" button creates a new connection between
the selected pin and the selected pads. There can be more than one pad selected,
in which case all of these pads will be connected to the selected pin. Use the
Ctrl and Shift keys in the usual way to mark more than one pad as selected.
The "Append" button adds the selected pads to the current connection.
The "Disconnect" button removes the selected connection and puts the pin and
pads back in their separate lists, keeping them selected so that it is easy to
make modifications. A Disconnect immediately followed by a Connect results in
the same configuration as before the Disconnect (and vice versa).
If a connection contains more than one pad, an icon indicates whether any or
all of these pads need to be externally connected to a signal. Click on this
icon to toggle the mode. When such a connection item is expanded, all the pads
are listed separately, and clicking on Disconnect with one of the pads selected
will only disconnect that one pad.
ed 6502.dev; prefix 'IC'; package dil40; connect gnd 1 rdy 2 phi1 3 !irq 4 nc1 5 !nmi 6 \ sync 7 vcc 8 a0 9 a1 10 a2 11 a3 12 a4 \ 13 a5 14 a6 15 a7 16 a8 17 a9 18 a10 19 \ a11 20 p$0 21 a12 22 a13 23 a14 24 a15 \ 25 d7 26 d6 27 d5 28 d4 29 d3 30 d2 31 \ d1 32 d0 33 r/w 34 nc2 35 nc3 36 phi0 37 \ so 38 phi2 39 !res 40;If a command is continued at the next line, it is advisable to insert the character "\" at the end of the line to ensure the following text cannot be confused with an EAGLE command.
Confusing parameters with commands can also be avoided
by enclosing the parameters in apostrophes.
COPY
See also GROUP,
CUT,
PASTE,
ADD,
INVOKE,
POLYGON
COPY deviceset@[library] [name]
COPY package@[library] [name]
COPY symbol@[library] [name]
The COPY command is used to copy objects within the same drawing, or between libraries. EAGLE will generate a new name for the copy but will retain the old value. When copying signals (wires), buses, and nets the names are retained, but in all other cases a new name is assigned.
SET Cmd.Copy.ClassicEagleMode 1to get back the original behavior of the COPY command (as well as the CUT command).
If you just want to use another gate of a multi-gate part, you should use the INVOKE command instead.
Note that any existing library objects (device sets, symbols or packages) used by the copied library object will be automatically updated.
Parts of a drawing (or even a whole board) can be copied onto other drawings by means of the commands CUT and PASTE.
To do this you first define a group (GROUP command). Then use the CUT command, followed by a reference point (mouse click or coordinates (x y)) to put the selected objects into the buffer. CUT; automatically puts the reference point at the center of the selected objects (snapped to the grid). Now you can change to an other drawing (EDIT) and copy the contents of the buffer onto the new drawing by executing the PASTE command.
SET Cmd.Copy.ClassicEagleMode 1to get back the original behavior of the CUT command (as well as the COPY command).
The DELETE command is used to delete the selected object.
Parts, pads, smds, pins and gates can also be selected by their name, which is especially useful if the object is outside the currently shown window area. Note that when selecting a multi-gate part in a schematic by name, you will need to enter the full instance name, consisting of part and gate name.
Attributes of parts can be selected by entering the concatenation of part name and attribute name, as in R5>VALUE.
Clicking the right mouse button deletes a previously defined GROUP.
After deleting a group it is possible that airwires which have been newly created due to the removal of a component may be "left over", because they have not been part of the original group. In such a case you should re-calculate the airwires with the RATSNEST command.
With active Forward&Back Annotation, no wires or vias can be deleted from a signal that is connected to components in a board. Also, no components can be deleted that have signals connected to them. Modifications like these have to be done in the schematic.
Use the RIPUP command to convert an already routed connection back into an airwire.
The DELETE command has no effect on layers that are not visible (refer to DISPLAY).
The DRC might generate error polygons which can only be deleted with DRC CLEAR.
DELETE SIGNALS can be used to delete all signals on a board. This is useful if you want to read in a new or changed netlist (see EXPORT). Only those signals are deleted which are connected to pads.
If you want to delete a part that has the name SIGNALS, you need to write the name in single quotes.
Gate | Deletes the entire part containing this gate (even if the gates are spread over several sheets). If f/b annotation is active, the wires connected to the element in the board will not be ripped up (as opposed to deleting a single gate), except for those cases where a pin of the deleted part is only connected directly to one single other pin and no net wire | |
Polygon Wire | Deletes the entire polygon | |
Net/Bus Wire | Deletes the entire net or bus segment |
Don't forget: Deleting can be reversed by the UNDO command!
This command is used to define or edit the description of a drawing or a library object.
The description_string may contain HTML tags.
The first non-blank line of description_string will be used as a short descriptive text (headline) in the Control Panel.
The DESCRIPTION command without a parameter opens a dialog in which the text can be edited. The upper pane of this dialog shows the formatted text, in case it contains HTML tags, while the lower pane is used to edit the raw text. At the very top of the dialog the headline is displayed as it would result from the first non-blank line of the description. The headline is stripped of any HTML tags.
By default the DESCRIPTION command works on the description of the object that is currently edited, like a device set, package, symbol, board or sheet. If, in a library, there is no currently edited object (as can be the case after it has been newly loaded) the description of the library will be changed.
To explicitly access the description of a library, even if a device, package or symbol is already being edited, enter the asterisk character ('*') as the first parameter to the DESCRIPTION command. This is also the way to access the description of a schematic, as opposed to the description of an individual sheet.
To access the description of the current MODULE, enter a pair of asterisk characters ('**') as the first parameter to the DESCRIPTION command.
DESCRIPTION '<b>Quad NAND</b><p>\nFour NAND gates with 2 inputs each.';This would result in
Quad NAND
Four NAND gates with 2 inputs each.
DIMENSION
See also LINE,
CHANGE,
CIRCLE,
HOLE
The DIMENSION command adds dimensioning to a drawing. It can either be applied to an object, or it can draw arbitrary dimensions.
If the first point selects an object, a suitable dimension object is generated as follows:
straight wire | linear dimension displaying the distance between the end points of the wire | |
curved wire | radius dimension displaying the radius of the arc | |
circle | diameter dimension displaying the diameter of the circle | |
hole | diameter dimension displaying the diameter of the hole |
If no object is selected, or a wire is selected at one of its end points, a dimension object is generated according to the current dimension type. If this dimension type is not the one that is needed, the right mouse button can be clicked to loop through the various types.
To draw an arbitrary dimension even at close proximity to an object that would trigger a specific kind of dimension, press the Ctrl key with the first click. This may also be useful when using the DIMENSION command in a script (by adding the 'C' modifier to the first coordinate), to make sure the dimension appears exactly as intended.
The way in which a dimension object is drawn (line, unit, precision) can be configured with "CHANGE DLINE/DUNIT" or with its properties dialog. Note that the "Unit" parameter in this dialog refers to the unit in which the actual numbers of the dimension object will be displayed.
Parallel
A parallel dimension displays the distance between its first and second reference point. The dimension line is parallel to the line going through its reference points, and it runs through the given alignment point. The actual position of the alignment point doesn't matter, only its distance from the the line through its reference points is taken into account. When a parallel dimension object is newly created or modified, the alignment point is normalized, so that it lies in the middle of the dimension line.
Horizontal
Same as parallel, but the dimension line extends only in X direction, and it displays only the X distance between the reference points.
Vertical
Like horizontal, but for Y.
Radius
A radius dimension displays the distance between its first and second reference point. The first reference point is at the center of the arc this dimension is drawn for, while the second point is somewhere on the arc itself. If the alignment point is between the two reference points, the dimension line is drawn between the reference points, which is "inside" the arc. Otherwise the dimension line is drawn "outside" of the arc. If the measurement text is too long to fit on an inside radius dimension, the dimension line is drawn on the outside. A radius dimension automatically displays a cross at its first reference point (which is the center of the arc). When a radius dimension object is newly created or modified, the alignment point is normalized, so that it lies in the middle of the dimension line for an "inside" dimension, or just beyond the arrow for an "outside" dimension.
Diameter
A diameter dimension displays the distance between its first and second reference point. The two reference points are on opposite sides of the circle's circumference, so their distance measures the circle's diameter. If the alignment point is between the two reference points, the dimension line is drawn between the reference points, which is "inside" the circle. Otherwise the dimension line is drawn "outside" of the circle, much like a parallel dimension. If the measurement text is too long to fit on an inside diameter dimension, the dimension line is drawn on the outside. A diameter dimension automatically displays a cross in the middle between its two reference points (which is the center of the circle). When a diameter dimension object is newly created or modified, the alignment point is normalized, so that it lies at the same coordinates as its second reference point for an "inside" dimension, or in the middle of the dimension line for an "outside" dimension.
Angle
An angle dimension displays the angle between the second and third reference point, measured counterclockwise around the first reference point (which is the center of the arc). When an angle dimension object is newly created or modified, the second reference point is normalized, so that it has the same distance from the first point as the third one does.
Leader
A leader dimension can be used to point at something in a drawing. There is an arrow at the first point, and the second and third point define a (bent) line. The leader doesn't display any measurement. You can use the TEXT command to place any text you need.
Valid options are: ALL, NONE, LAST, ? and ??
The DISPLAY command is used to choose the visible layers. As parameters, the layer number and the layer name are allowed (even mixed). If the parameter ALL is chosen, all layers become visible. If the parameter NONE is used, all layers are switched off. For example:
DISPLAY NONE BOTTOM;Following this command only the Bottom layer is displayed.
If the parameter LAST is given, the previously visible layers will be displayed.
Please note that only those signal layers (1 through 16) are available that have been entered into the layer setup in the Design Rules.
If the layer name or the layer number includes a negative sign, it will be filtered out. For example:
DISPLAY TOP -BOTTOM -3;In this case the Top layer is displayed while the Bottom layer and the layer with the number 3 are not shown on the screen.
Avoid layer names ALL and NONE as well as names starting with a "-".
Some commands (PAD, SMD, SIGNAL, ROUTE) automatically activate certain layers.
If the DISPLAY command is invoked without parameters, a dialog is presented which allows you to adjust all layer settings.
DISPLAY TOP BOTTOM ? MYLAYER1 MYLAYER2 ?? OTHER WHATEVERIn the above example the two layers TOP and BOTTOM are required and will cause an error if either of them is missing. MYLAYER1 and MYLAYER2 will just be reported if missing, allowing the user to cancel the operation, and OTHER and WHATEVER will be displayed if they are there, otherwise they will be ignored.
The '?' and '??' options may appear any number of times and in any sequence.
If the color selected for layer 17 (Pads) or 18 (Vias) is 0 (which represents the current background color), the pads and vias are displayed in the color and fill style of the respective signal layers. If no signal layer is visible, pads and vias are not displayed.
If the color selected for layer 17 (Pads) or 18 (Vias) is not the background color and no signal layers are visible, pads and vias are displayed in the shape of the uppermost and undermost layer.
This also applies to printouts made with PRINT.
The syntax to handle these aliases is:
DISPLAY = MyLayers None Top Bottom Pads Vias Unrouted
Defines the alias "MyLayers" which, when used as in
DISPLAY myl
will display just the layers Top, Bottom, Pads, Vias and Unrouted
(without the "None" parameter the given layers would be displayed in
addition to the currently visible layers).
Note the abbreviated use of the alias and the case insensitivity.
DRC
See also Design Rules,
CLASS,
SET,
ERC,
ERRORS
DRC ;
DRC LOAD|MERGE|SAVE filename;
DRC *
The command DRC checks a board against the current set of Design Rules.
Please note that electrically irrelevant objects (wires in packages, rectangles, circles and texts) are not checked against each other for clearance errors.
The errors found are displayed as error polygons in the respective layers, and can be browsed through with the ERRORS command.
Without parameters the DRC command opens a Design Rules dialog in which the board's Design Rules can be defined, and from which the actual check can be started.
If two coordinates are given in the DRC command (or if the Select button is clicked in the Design Rules dialog) all checks will be performed solely in the defined rectangle. Only errors that occur (at least partly) in this area will be reported.
If you get DRC errors that don't go away, even if you modify the Design Rules, make sure you check the Net class of the reported object to see whether the error is caused by a specific parameter of that class.
To delete all error polygons use the command
ERRORS CLEAR
The LOAD and SAVE options can be used to load the Design Rules from or save them to the given file. If filename doesn't have the extension ".dru" it will be appended automatically. The MERGE option can be used to merge some additional Design Rules parameters (the others remain unchanged).
If the DRC command is given an asterisk character ('*') as the first parameter, the Design Rules dialog will be opened and allow editing the Design Rules, without triggering an actual check when the dialog is confirmed.
SET DRC_FILL fill_name;Defines the fill style used for the DRC error polygons. Default is LtSlash.
The EDIT command is used to load a drawing or if a library has been opened with the OPEN command, to load a package, symbol, or device for editing.
The EDIT command is also used to create or edit modules within a schematic.
EDIT name.brd | loads a board | |
EDIT name.sch | loads a schematic | |
EDIT name.pac | loads a package | |
EDIT name.sym | loads a symbol | |
EDIT name.dev | loads a device | |
EDIT .s3 | loads sheet 3 of a schematic | |
EDIT .s5 .s2 | moves sheet 5 before sheet 2 and loads it (if sheet 5 doesn't exist, a new sheet is inserted before sheet 2) | |
EDIT .s2 .s5 | moves sheet 2 before sheet 5 and loads it (if sheet 5 doesn't exist, sheet 2 becomes the last sheet) | |
EDIT name.mod | loads (or creates) a module within a schematic | |
EDIT name.m2 | loads (or creates) sheet 2 of module | |
EDIT .m3 | loads (or creates) sheet 3 of the current module | |
EDIT .s2 modY.m1 | moves sheet 2 before sheet 1 of module 'modY' and loads it | |
EDIT modX.m3 modY.m1 | moves sheet 3 of module 'modX' before sheet 1 of module 'modY' and loads it | |
EDIT; | shows table of contents (in a library) |
Wildcards in the name are allowed (e.g. *.brd).
The EDIT command without parameters will cause a file dialog (in board or schematic mode) or a popup menu (in library mode) to appear from which you can select the file or object.
To change from schematic to a board with the same name the command
EDIT .brdcan be used. In the same way to change from board to schematic use the command
EDIT .schIt's also possible to change from the library editor to board or schematic.
To edit another sheet of a schematic the command
EDIT .sX(X is the sheet number) or the combo box in the action toolbar of the editor window can be used. If the given sheet number doesn't exist, a new sheet is created.
You can also switch between sheets by clicking on an icon of the sheet thumbnail preview. Drag&drop in the thumbnail preview allows you to reorder sheets.
Symbols, devices or packages may only be edited if a library is first opened with the OPEN command.
This command is used to test schematics for electrical errors. The result of the check is presented in the ERRORS dialog.
Please note that the ERC detects inconsistencies between the implicit power
and supply pins in the schematic and the actual signal connections in the board.
Such inconsistencies can occur if the supply pin configuration is modified
after the board has been created with the BOARD command. Since the power
pins are only connected "implicitly", these changes can't always be forward
annotated.
If such errors are detected, Forward&Back Annotation
will still be performed, but the supply pin configuration should be checked!
ERRORS
See also ERC,
DRC
ERRORS CLEAR
The command ERRORS is used to show the errors found by the Electrical Rule Check (ERC) or the Design Rule Check (DRC). If selected, a window is opened in which all errors are listed. If no ERC or DRC has been run for the loaded drawing, yet, the respective check will be started first.
The list view in the ERRORS dialog has up to four sections that contain Consistency errors, Errors, Warnings and Approved messages, respectively.
Selecting an entry with the mouse causes the error to be marked in the editor window with a rectangle and a line from the upper left corner of the screen.
Double clicking an entry centers the drawing to the area where the error is located. Checking the "Centered" checkbox causes this to happen automatically.
The list can also be cleared by entering the command
ERRORS CLEAR
The EXPORT command is used to provide you with ASCII text files which can be used e.g. to transfer data from EAGLE to other programs, or to generate an image file from the current drawing.
By default the output file is written into the Project directory.
The command generates the following output files:
Set Undo_Log Off;is given before.
.bmp | Windows Bitmap Files | |
.png | Portable Network Graphics Files | |
.pbm | Portable Bitmap Files | |
.pgm | Portable Grayscale Bitmap Files | |
.ppm | Portable Pixelmap Files | |
.tif | TIFF Files | |
.xbm | X Bitmap Files | |
.xpm | X Pixmap Files |
The resolution parameter defines the image resolution (in 'dpi').
If filename is the special name CLIPBOARD (upper or lowercase doesn't matter) the image will be copied into the system's clipboard.
The optional keyword MONOCHROME creates a black&white image.
The optional keyword WINDOW creates an image of the currently visible area in the editor window. Without this keyword, the image will contain the entire drawing.
The FRAME command draws a frame with numbered columns and rows. The two points define two opposite corners of the frame. Pressing the center mouse button changes the layer to which the frame is to be added.
The columns parameter defines the number of columns in the frame. There can be up to 127 columns. By default the columns are numbered from left to right. If the columns value is negative, they are numbered from right to left.
The rows parameter defines the number of rows in the frame. There can be up to 26 rows. Rows are marked from top to bottom with letters, beginning with 'A'. If the rows value is negative, they are marked from bottom to top. If rows is given, it must be preceeded by columns.
The borders parameter, if given, defines which sides of the frame will have a border with numbers or letters displayed. Valid options for this parameter are Left, Top, Right and Bottom. By default all four sides of the frame will have a border. If any of these options is given, only the requested sides will have a border. The special options None and All can be used to have no borders at all, or all sides marked.
Even though you can draw several frames in the same drawing, only the first one will be used for calculating the positions of parts and nets. These positions can be used, for instance, in a User Language Program to generate a list of parts with their locations in their respective frame. They are also used internally to automatically generate cross references for labels.
Due to the special nature of the frame object, it doesn't have a rotation of its own, and it doesn't get rotated with the ROTATE command.
A frame can be drawn directly into a board or schematic, but more typically you will want to create a special symbol or package drawing that perhaps also contains a title block, which you can then use in all your drawings. The "frames" library that comes with EAGLE contains several drawing frames.
FRAME 10 5 TOP LEFT draws a frame with 10 columns (numbered from left to right) and 5 rows (marked 'A' to 'E' from top to bottom) that has the column and row indicators drawn only at the top and left border.
Using this command two gates may be swapped within a schematic. Both gates must be identical with the same number of pins and must be allocated the same Swaplevel in the device definition. They do not, however, need to be in the same device.
The name used in the GATESWAP command is the displayed name on the schematic (e.g. U1A for gate A in device U1).
If a device is not used anymore after the GATESWAP command, it is
deleted automatically from the drawing.
GRID
See also SCRIPT
GRID;
The GRID command is used to specify the grid and the current unit. Given without an option, this command switches between GRID ON and GRID OFF.
The following options exist:
GRID ON; | Displays the grid on the screen | |
GRID OFF; | Turns off displayed grid | |
GRID DOTS; | Displays the grid as dots | |
GRID LINES; | Displays the grid as solid lines | |
GRID MIC; | Sets the grid units to micron | |
GRID MM; | Sets the grid units to mm | |
GRID MIL; | Sets the grid units to mil | |
GRID INCH; | Sets the grid units to inch | |
GRID FINEST; | Sets the grid to the finest possible value | |
GRID grid_size; | Defines the distance between | |
the grid points in the actual unit | ||
GRID LAST; | Sets grid to the most recently | |
used values | ||
GRID DEFAULT; | Sets grid to the standard values | |
GRID grid_size grid_multiple; | ||
grid_size = grid distance | ||
grid_multiple = grid factor | ||
GRID ALT ...; | Defines the alternate grid |
Grid mm; Set Diameter_Menu 1.0 1.27 2.54 5.08; Grid Last;In this case you can change back to the last grid definition although you don't know what the definition looked like.
GRID mm 1 10;for instance specifies that the distance between the grid points is 1 mm and that every 10th grid line will be displayed.
Note: The first number in the GRID command always represents the grid distance, the second - if existing - represents the grid multiple.
The GRID command may contain multiple parameters:
GRID inch 0.05 mm;In this case the grid distance is first defined as 0.05 inch. Then the coordinates of the cursor are chosen to be displayed in mm.
GRID DEFAULT;Sets grid to the standard value for the current drawing type.
GRID mil 50 2 lines on alt mm 1 mil;Defines a 50 mil grid displayed as lines (with only every other line visible), and sets the alternate grid size to 1 mm, but displays it in mil.
Pressing the Alt key switches to the alternate Grid. This can typically be a finer grid than the normal one, which allows you to quickly do some fine positioning in a dense area, for instance, where the normal grid might be too coarse. The alternate grid remains active as long as the Alt key is held pressed down.
The syntax to handle these aliases is:
GRID = MyGrid inch 0.1 lines on
Defines the alias "MyGrid" which, when used as in
GRID myg
will change the current grid to the given settings.
Note the abbreviated use of the alias and the case insensitivity.
GROUP
See also CHANGE,
CUT,
PASTE,
MIRROR,
DELETE
GROUP ALL
GROUP;
The GROUP command is used to define a group of objects for a successive command. Also a whole drawing or an element can be defined as a group. Objects are selected - after activating the GROUP command - by click&dragging a rectangle or by drawing a polygon with the mouse. The easiest way to close the polygon is to use the right mouse button. Only objects from displayed layers can become part of the group.
The keyword ALL can be used to define a group that includes the entire drawing area.
The group includes:
For instance: In order to change several pad shapes, select CHANGE and SHAPE with the left mouse button and select the group with the right mouse button.
The group definition remains until a new drawing is loaded or the command
GROUP;is executed.
See the Group Default On option for more info.
A command name within the HELP command shows the help page of that
command.
HELP
This command opens a context sensitive help window.
HELP command
Example
HELP GRID;
displays the help page for the GRID command.
HOLE
See also VIA,
PAD,
CHANGE
This command is used to define e.g. mounting holes (has no electrical connection between the different layers) in a board or in a package. The parameter drill defines the diameter of the hole in the actual unit. It may be up to 200 mm (7.7840 inch).
HOLE 0.20 If the actual unit is "inch", the hole will have a diameter of 0.20 inch.
The entered value for the diameter (also used for via-holes and pads) remains as a presetting for successive operations. It may be changed with the command:
CHANGE DRILL value A hole can only be selected if the Holes layer is displayed.
A hole generates a symbol in the Holes layer as well as a circle with the diameter of the hole in the Dimension layer. The relation between certain diameters and symbols is defined in the "Options/Set/Drill" dialog. The circle in the Dimension layer is used by the Autorouter. As it will keep a (user-defined) minimum distance between via-holes/wires and dimension lines, it will automatically keep this distance to the hole.
In the layers tStop and bStop, holes generate the solder
stop mask, whose diameter is determined by the Design Rules.
INFO
See also CHANGE,
SHOW
INFO name ..
The INFO command displays further details about an object's properties on screen, e.g. wire width, layer number, text size etc. It is also possible to modify properties in this dialog.
Parts, pads, smds, pins and gates can also be selected by their name, which is especially useful if the object is outside the currently shown window area. Note that when selecting a multi-gate part in a schematic by name, you will need to enter the full instance name, consisting of part and gate name.
Attributes of parts can be selected by entering the concatenation of part name and attribute name, as in R5>VALUE.
The coordinates of a rotated rect are not changeable.
INVOKE
See also COPY,
ADD
INVOKE part_name gate_name orientation
See the ADD command for an explanation of Addlevel und Orientation.
The INVOKE command is used to select a particular gate from a device which is already in use and place it in the schematic (e.g. a power symbol with Addlevel = Request).
Gates are activated in the following way:
If an already invoked gate is selected in the dialog, the default button changes to "Show", and a click on it zooms the editor window in on the selected gate, switching to a different sheet if necessary.
This command is used to draw a connection dot at the intersection of nets which are to be connected to each other. Junction points may be placed only on a net. If placed on the intersection of different nets, the user is given the option to connect the nets.
If a net wire is placed at a point where there are at least two other net wires and/or pins, a junction will automatically be placed. This function can be disabled with "SET AUTO_JUNCTION OFF;", or by unchecking "Options/Set/Misc/Auto set junction".
On the screen junction points are displayed at least with a diameter
of five pixels.
LABEL
See also NAME,
BUS,
FRAME
Bus or net names may be placed on a schematic in any location by using the label command. When the bus or net is clicked on with the mouse, the relevant label attaches to the mouse cursor and may be rotated, changed to another layer, or moved to a different location. The second mouse click defines the location of the label.
The orientation of the label may be defined textually using the usual definitions as listed in the ADD command (R0, R90 etc.).
Buses and nets may have any number of labels.
Labels cannot be changed with "CHANGE TEXT".
Labels are handled by the program as text, but their value corresponds to the name of the appropriate bus or net. If a bus or net is renamed with the NAME command, all associated labels are renamed automatically.
If a bus, net, or label is selected with the SHOW command, all connected buses, nets and labels are highlighted.
The format in which a cross-reference label is displayed can be controlled through the "Xref label format" string, which is defined in the "Options/Set/Misc" dialog, or with the SET command. The following placeholders are defined, and can be used in any order:
%F | enables drawing a flag border around the label | |
%N | the name of the net | |
%S | the next sheet number | |
%C | the column on the next sheet | |
%R | the row on the next sheet |
The default format string is "%F%N/%S.%C%R". Apart from the defined placeholders you can also use any other ASCII characters.
The column and row values only work if there is a frame on the next sheet on which the net appears. If %C or %R is used and there is no frame on that sheet, they will display a question mark ('?').
When determining the column and row of a net on a sheet, first the column and then the row within that column is taken into account. Here XREF labels take precedence over normal labels, which again take precedence over net wires. For a higher sheet number, the frame coordinates of the left- and topmost field are taken, while for a lower sheet number those of the right- and bottommost field are used.
The orientation of a cross-reference label defines whether it will point to a "higher" or a "lower" sheet number. Labels with an orientation of R0 or R270 point to the right or bottom border of the drawing, and will therefore refer to a higher sheet number. Accordingly, labels with an orientation of R90 or R180 will refer to a lower sheet number. If a label has an orientation of R0 or R270, but the net it is attached to is not present on any higher sheet, a reference to the next lower sheet is displayed instead (the same applies accordingly to R90 and R180). If the net appears only on the current sheet, no cross-reference is shown at all, and only the net name is displayed (surrounded by the flag border, if the format string contains the %F placeholder).
A cross-reference label that is placed on the end of a net wire will connect to the wire so that the wire is moved with the label, and vice versa.
The cross-reference label format string is stored within the schematic drawing file.
A cross-reference label can be changed to a normal label either through the CHANGE command or the label's Properties dialog.
LAYER layer; LINE (1 2) (3 4);doesn't work here. The layer needs to be selected while the LABEL command is already active, which can be done like this
LABEL parameters LAYER layer more parameters;Note that the LABEL line is not terminated with a ';', and that the LAYER command starts on a new line.
LABEL LAYER layer;set the layer to use with subsequent LABEL commands.
Certain layers are not available in all modes.
Please note that only those signal layers (1 through 16) are available that have been entered into the layer setup in the Design Rules.
LAYER 101 SAMPLE;you define a new layer with layer number 101 and layer name SAMPLE.
If a package contains layers not yet specified in the board, these layers are added to the board as soon as you place the package into the board (ADD or REPLACE).
The predefined layers have a special function. You can change their names, but their functions (related with their number) remain the same.
If you define your own layers, you should use only numbers greater than 100. Numbers below may be assigned for special purposes in later EAGLE versions.
LAYER 53 tSomething; LAYER 54 bSomething;This is supported for the layer pairs 53/54, 55/56, 57/58 and 59/60. It should be used with care regarding later EAGLE versions.
LAYER -103;deletes the layer number 103. Layers to be deleted must be empty. If this is not the case, the program generates the error message
"layer is not empty: #"
where "#" represents the layer number. If you want to avoid any error messages in a layer delete operation you can use the '??' option. This may be useful in scripts that try to delete certain layers, but don't consider it an error if any of these layers is not empty or not present at all.
1 Top | Tracks, top side | |
2 Route2 | Inner layer | |
3 Route3 | Inner layer | |
4 Route4 | Inner layer | |
5 Route5 | Inner layer | |
6 Route6 | Inner layer | |
7 Route7 | Inner layer | |
8 Route8 | Inner layer | |
9 Route9 | Inner layer | |
10 Route10 | Inner layer | |
11 Route11 | Inner layer | |
12 Route12 | Inner layer | |
13 Route13 | Inner layer | |
14 Route14 | Inner layer | |
15 Route15 | Inner layer | |
16 Bottom | Tracks, bottom side | |
17 Pads | Pads (through-hole) | |
18 Vias | Vias (through-hole) | |
19 Unrouted | Airwires (rubberbands) | |
20 Dimension | Board outlines (circles for holes) | |
21 tPlace | Silk screen, top side | |
22 bPlace | Silk screen, bottom side | |
23 tOrigins | Origins, top side | |
24 bOrigins | Origins, bottom side | |
25 tNames | Service print, top side | |
26 bNames | Service print, bottom side | |
27 tValues | Component VALUE, top side | |
28 bValues | Component VALUE, bottom side | |
29 tStop | Solder stop mask, top side | |
30 bStop | Solder stop mask, bottom side | |
31 tCream | Solder cream, top side | |
32 bCream | Solder cream, bottom side | |
33 tFinish | Finish, top side | |
34 bFinish | Finish, bottom side | |
35 tGlue | Glue mask, top side | |
36 bGlue | Glue mask, bottom side | |
37 tTest | Test and adjustment inf., top side | |
38 bTest | Test and adjustment inf. bottom side | |
39 tKeepout | Nogo areas for components, top side | |
40 bKeepout | Nogo areas for components, bottom side | |
41 tRestrict | Nogo areas for tracks, top side | |
42 bRestrict | Nogo areas for tracks, bottom side | |
43 vRestrict | Nogo areas for via-holes | |
44 Drills | Conducting through-holes | |
45 Holes | Non-conducting holes | |
46 Milling | Milling | |
47 Measures | Measures | |
48 Document | General documentation | |
49 Reference | Reference marks | |
51 tDocu | Part documentation, top side | |
52 bDocu | Part documentation, bottom side |
91 Nets | Nets | |
92 Busses | Buses | |
93 Pins | Connection points for component symbols | |
with additional information | ||
94 Symbols | Shapes of component symbols | |
95 Names | Names of component symbols | |
96 Values | Values/component types | |
97 Info | General information | |
98 Guide | Guide lines |
The LINE command is used to add lines (tracks) to a drawing. The line begins at the first point specified and runs to the second. Additional points draw additional line segments. Two mouse clicks at the same position finish the line and a new one can be started at the position of the next mouse click.
Depending on the currently active bend style, one or two line segments will be drawn between every two points. The bend style defines the angle between the segments and can be changed with the right mouse button (holding the Shift key down while clicking the right mouse button reverses the direction in which the bend styles are gone through, and the Ctrl key makes it toggle between corresponding bend styles).
Pressing the center mouse button brings up a popup menu from which you may select the layer into which the line will be drawn.
The special keywords ROUND and FLAT, as well as the curve parameter, can be used to draw an arc (see below).
Starting a LINE with the Ctrl key pressed snaps the starting point of the new line to the coordinates of the closest existing line. This is especially useful if the existing line is off grid. It also adjusts the current width, layer and style to those of the existing line. If the current bend style is 7 ("Freehand"), the new line will form a smooth continuation of the existing line.
The signal_name parameter is intended mainly to be used in
script files that read in generated data. If a signal_name
is given, all subsequent lines will be added as wires to that signal and no
automatic checks will be performed.
This feature should be used with great care because it could result
in short circuits, if a wire is placed in a way that it would connect
different signals. Please run a
Design Rule Check after using the LINE command
with the signal_name parameter for signals!
The line width can be changed with the command
CHANGE WIDTH width at any time.
Note that the DRC and Autorouter will always treat lines as "Continuous", even if their style is different. Line styles are mainly for electrical and mechanical drawings and should not be used on signal layers. It is an explicit DRC error to use a non-continuous line as part of a signal that is connected to any pad.
Note that EAGLE treats each line segment as a single object (e.g. when deleting a line).
When the LINE command is active the center mouse button can be used to change the layer on which the line is drawn.
The valid range for curve is ]-360..+360[ (without the limits +-360),
and its value means what
part of a full circle the arc consists of. A value of 90, for instance,
would result in a 90° arc, while 180 would give you a semicircle.
Full circles cannot be created this way (for this use the CIRCLE command).
Positive values for curve mean that the arc is drawn in a mathematically positive sense
(i.e. counterclockwise). If curve is 0, the arc is straight
("no curvature"), which is actually a line. Note that in order to distinguish the
curve parameter from the width parameter, it always has to be given with
a sign ('+' or '-'), even if it is a positive value.
As an example, the command
LINE (0 0) +180 (0 10);would draw a semicircle from the point (0 0) to (0 10), in counterclockwise direction.
If a radius is given, the arc will have that radius. Just like the curve parameter, radius also must have a sign in order to determine the arcs orientation. For example, the command
LINE (0 0) @+100 (0 200);would draw a semicircle from the point (0 0) to (0 200) (with a radius of 100), in counterclockwise direction. Note that if the end point is more than twice the radius away from the start point, a straight line will be drawn.
The arc radius can also be defined by placing the line end point with the Ctrl key pressed (typically at the center of the circle on which the arc shall lie). In that case the point is not taken as an actual end point, but is rather used to set the radius of an arc. You can then move the cursor around and place an arc with the given radius (the right mouse button together with Ctrl will toggle the arc's orientation). If you move the cursor more than twice the radius away from the start point, a straight line will be drawn.
In order to be able to draw any arc with the LINE command (which is especially important
for generated script files), the keywords ROUND and FLAT are also
allowed in the LINE command. Note, though, that these apply only to actual arcs
(straight lines always have round endings). By default, arcs created with the LINE
command have round endings.
LOCK
See also MIRROR,
MOVE,
ROTATE
SMASH
LOCK name ..
The LOCK command can be applied to parts in a board, and prevents them from being moved, rotated, or mirrored. This is useful for things like connectors, which need to be mounted at a particular location and must not be inadvertently moved.
The origin of a locked part is displayed as an 'x' to have a visual indication that the part is locked.
If a group is moved and it contains locked parts, these parts (together with any wires ending at their pads) will not move with the group.
Detached texts of a locked part can still be moved individually, but they won't move with a group.
Parts can also be selected by their name, which is especially useful if the object is outside the currently shown window area.
A "locked" part can be made "unlocked" by clicking on it with the
Shift key pressed (and of course the LOCK command activated).
MARK
See also GRID
MARK;
The MARK command allows you to define a point on the drawing area and display the coordinates of the mouse cursor relative to that point at the upper left corner of the screen (with a leading 'R' character). This command is useful especially when board dimensions or cutouts are to be defined. Entering MARK; turns the mark on or off.
Please choose a grid fine enough before using the MARK command.
MEANDER
See also ROUTE
The MEANDER command can be used to balance the lengths of signals forming a differential pair. To do this, just click on a wire of a differential pair and move the mouse cursor away from the selection point. If there is a difference in the length of the two signals, and the current mouse position is far enough away from the selection point, a "meander" shaped sequence of wires will be drawn that increases the length of the shorter signal segment. An indicator attached to the mouse cursor shows the target length (which is the length of the longer signal segment), as well as the deviation (in percent) of the two signals from the target length.
The meander starts at the first click point and extends to the second point the mouse is moved to. The maximum (perpendicular) size of the meander is defined by the distance of the mouse to the meandered wire.
If a single meander isn't enough to balance the lengths, you can add further meanders at different locations.
At any time you can enter a value in the command line to set the target length. This can be used for all signals, not just for differential pairs.
When meandering a differential pair with a given target length, the meander first tries to balance the length of the two signal segments that form the differential pair, and then increases the total length of both segments.
To reset the target length you can either restart the MEANDER command or enter a value of 0 in the command line.
If you do the measuring with Ctrl+Shift pressed, the maximum length of this or any previously selected segments will be taken. This can be used to easily determine the maximum length of several bus signals and then meandering each of them to that length.
The MENU command can be used to create a user specific command menu.
The complete syntax specification for the option parameters is
option := command | submenu | delimiter command := [ icon ] text1 [ ':' text2 ] submenu := [ icon ] text '{' option [ '|' option ] '}' icon := '[' filename ']' delimiter := '---'A menu option can be a simple command, as in
MENU Display Grid;which would set the menu to the commands Display and Grid. Display and Grid are interpreted both as menu text and as commands.
MENU 'MyDisp : Display None Top Bottom Pads Vias;' 'MyGrid : Grid mil 100 lines on;';which would set the menu to show the command aliases MyDisp and MyGrid and actually execute the command sequence behind the ':' of each option (text2, see above) when the respective button is clicked.
MENU 'Grid { Fine : Grid inch 0.001; | Coarse : Grid inch 0.1; }';which would define a button labeled Grid that, when clicked opens a submenu with the two options Fine and Coarse.
The special option '---' can be used to insert a delimiter, which may be useful for grouping buttons.
A command button can display an icon by preceding the button text with the file name of an icon, enclosed in square brackets, as in
MENU '[/path/to/myicon.png] Set a fine grid : Grid inch 0.001;';Here the button will display only the given icon, and "Set a fine grid" will be used as a "tool tip" that gets displayed when the mouse cursor is moved over the button. The filename needs not be enquoted additionally (like for masking spaces).
MENU 'Grid { [/path/to/myicon.png] Set a fine grid : Grid inch 0.001; }';then both the icon and the text will be displayed, as with any other popup menu.
Note that any option that consists of more than a single word, or that might be interpreted as a command, must be enclosed in single quotes. If you want to use the MENU command in a script to define a complex menu, and would like to spread the menu definitions over several lines to make them more readable, you need to end the lines with a backslash character ('\') as in
MENU 'Grid {\ Fine : Grid inch 0.001; |\ Coarse : Grid inch 0.1;\ }';
MENU Move Delete Rotate Route ';' Edit;would create a command menu that contains the commands Move...Route, the semicolon, and the Edit command.
The command
MENU;switches back to the default menu. Note that the ';' entry should always be added to the menu. It is used to terminate many commands.
Complex example:
MENU '[draw.png] Draw {\ Wire {\ Continous : CHANGE STYLE Continuous; LINE |\ DashDot : CHANGE STYLE DashDot; LINE |\ Help : HELP LINE;\ }|\ Rectangle {\ RECT |\ Help : HELP RECT; \ }\ }\ [export.png] Export {\ Script : EXPORT SCRIPT |\ Image : EXPORT IMAGE\ }\ MyScript : SCRIPT MyScript.scr;';This menu consists of the 3 entries Draw, Export and MyScript, whereat Draw and Export have submenus and are supplied with icons. Draw consists of the submenus Wire and Rectangle, whereat Wire consists of the entries Continous, DashDot and Help and Rectangle consists of the entries RECT (text and command RECT) and Help.
Using the MIRROR command, objects may be mirrored about the y axis. One application for this command is to mirror components to be placed on the reverse side of the board.
Parts, pads, smds and pins can also be selected by their name, which is especially useful if the object is outside the currently shown window area.
Attributes of parts can be selected by entering the concatenation of part name and attribute name, as in R5>VALUE.
Components can be mirrored only if the appropriate tOrigins/bOrigins layer is visible.
When packages are selected for use with the MIRROR command, connected wires on the outer layers are mirrored, too (beware of short circuits!).
Note that any objects on inner layers (2...15) don't change their layer when they are mirrored. The same applies to vias.
Parts cannot be mirrored if they are locked, or if any of their connected pads would extend outside the allowed area (in case you are using a limited edition of EAGLE).
Wires, circles, pads and polygons may not be individually mirrored unless included in a group.
Mirrored text in a schematic will be printed on the other side of its origin point,
but it will still remain normally readable.
MITER
See also SPLIT,
LINE,
ROUTE,
POLYGON
The MITER command can be used to take the edge off a point where two wires join. The two existing wires need to be on the the same layer and must have the same width and wire style.
The MODULE command is used to create modules used in hierarchical schematics and add module instances into a sheet.
If +offset is given, the current module instance will use this offset for naming the elements. The value has to be a multiple of 100 (e.g. +100). Note that this is only supported for module instances in the main schematic (details see below).
The orientation of the module instance may be defined textually using the usual definitions as listed in the ADD command (R0, R90 etc.).
The PORT command is used to add ports to a module.
A module instance adds the parts and nets of that module to the board. Net names are composed using the module name and the net name (e.g. 'MODULE1:N$1'). If a net is exported through a PORT, it could be overwritten with a net connected to this port. Part names of a module instance with an offset are generated by adding this offset (e.g. 'R17' with offset '100' becomes 'R117', details see below). If no offset is set, part names are composed the same way as net names (e.g. 'MODULE1:R17').
In order to choose a specific assembly variant of the module, its name has to be prepended the module name (e.g. 'V1@ABC').
If neither prefix nor a name for the module instance is given, the module name will be used as a prefix.
The module instance names may be modified with the NAME command.
The offset notation for module instances has the advantage of creating shorter names
but it has to be used carefully, because it can lead to naming conflicts for the elements.
Example:
If you have parts R1-R9 in a module M and on the schematic main level the part (resp. element) names R201 to R209 are already used, it's not possible to create a module instance MI of M with offset 200, because the elements generated would also occupy names R201 to R209. The same is if there's another module instance with parts R101 to R109 and offset 100. EAGLE checks and refuses that with an error message in such cases. It can easily be solved by trying another positive offset or using offset 0 (i.e. composite notation).
Even if the offset notation works without conflicts it can still be confusing: in the upper sample if you decide to change to offset 300 but have parts on main level with names R310, R311 etc., it's difficult to recognize that these parts do NOT belong to MI but to main level. Because of that it's recommended to make the offsets large enough to avoid such misunderstandings.
Depending on what you intend to do, the composite notation using short module instance names may be the better alternative.
Also in order to reduce misunderstandings, any offset can only be used once in the whole schematic. The properties dialog for module instances allows changing the offset only to those values that are not yet occupied (or to 0).
Offsets > 0 are not supported for deeper hierarchy levels.
Example:
Instance F0 uses module FILTER with offset 100, instance SUB resides in FILTER and uses
SUBMODULE with offset 0.
For the elements corresponding to the parts for FILTER offset 100 is applied, for the elements
(and also signals) corresponding to SUBMODULE the composite notation is used like a directory path,
the same for nets/signals. For example, the name of the element corresponding to C1 in SUBMODULE
will be M0:SUB:C1.
(Remark: if offsets were allowed for deeper hierarchies as well, there would be even
more possible name conflicts and misunderstandings).
The MOVE command is used to move objects.
Parts, pads, smds, pins and gates can also be selected by their name, which is especially useful if the object is outside the currently shown window area. Note that when selecting a multi-gate part in a schematic by name, you will need to enter the full instance name, consisting of part and gate name.
Attributes of parts can be selected by entering the concatenation of part name and attribute name, as in R5>VALUE.
Elements can be moved only if the appropriate tOrigins/bOrigins layer is visible.
The MOVE command has no effect on layers that are not visible (refer to DISPLAY).
The ends of wires (tracks) that are connected to an element cannot be moved at this point.
When moving elements, connected wires (tracks) that belong to a signal are moved too (beware of short circuits!).
If an object is selected with the left mouse button and the button is not released, the object can be moved immediately ("click&drag"). The same applies to groups when using the right mouse button. In this mode, however, it is not possible to rotate or mirror the object while moving it.
Parts cannot be moved if they are locked, or if any of their connected pads would extend outside the allowed area (in case you are using a limited edition of EAGLE).
Pins or ports placed on each other are connected together.
If unconnected pins of an element are placed on nets or pins then they are connected with them.
If nets are moved over pins they are not connected with them.
If you select a wire somewhere in the middle (not at one of its end points) with Ctrl pressed, the end points stay fixed and you can bend the wire, which changes it into an arc. The same way the curvature of an arc (which is basically a wire) can be modified.
If you select a rectangle at one of its corners with Ctrl pressed, you can resize both the rectangle's width and height. Selecting an edge of the rectangle with Ctrl pressed lets you resize the rectangle's width or height, respectively. Selecting the rectangle at its center with Ctrl pressed pulls it towards the cursor and snaps it into the current grid.
If you select a circle at its circumference with Ctrl pressed, the center stays fixed and you can resize the circle's diameter. Selecting the center point this way pulls it towards the cursor and snaps it into the current grid.
If you select a port with Ctrl pressed, only the port is moved. Of course this port moving takes affect on all instances of this module.
Note that only wires that have both ends in the group will be transferred, and any part that is transferred takes all its electrical connections with it, even if a net wire attached to one of its pins is not transferred because its other end is not in the group. In case a pin in the new sheet has an electrical connection, but no other pin, wire or junction attached to it to make this visible, a junction will be automatically generated at this point.
This process can even be scripted. For instance
edit .s1 group (1 1) (1 2) (2 2) (2 1) (1 1) move (> 0 0) edit .s2 (0 0)would switch to the first sheet, define a group, select that group with MOVE, switch to the second sheet and place the group. Note the final (0 0), which are coordinates to the implicitly invoked MOVE command.
See the EDIT command if you want to just reorder the sheets.
The NAME command is used to display or edit the name of the selected object.
Parts, elements, pads, smds, pins and gates can also be selected by their name, which is especially useful if the object is outside the currently shown window area. Other object types (e.g. nets, busses, signals) have to be clicked first.
Beside the main schematic each module has it's own namespace. So it's no problem to have parts R1-R9 in main schematic and also in some modules. See also MODULE command, naming section.
This segment
Every segment on this sheet
All segments on all sheets
These questions appear in a popup menu if necessary and can be answered either by selecting the appropriate item with the mouse or by pressing the appropriate hot key (T, E, A).
The net command is used to draw individual connections (nets) onto the Net layer of a schematic drawing. The first mouse click marks the starting point for the net, the second marks the end point of a segment. Two mouse clicks on the same point end the net.
Net wires snap to the tips of pins. When the mouse is within SNAP_LENGTH of any portion of a pin (either before or after grid snapping), a small circle will appear at the tip of the pin. This indicates that if the mouse is clicked, the resulting net wire point will be placed at the pin tip, creating a connection to the pin.
If a net wire is placed at a point where there is already another net or bus wire or a pin, the current net wire will be ended at that point. This function can be disabled with "SET AUTO_END_NET OFF;", or by unchecking "Options/Set/Misc/Auto end net and bus".
If a net wire is placed at a point where there are at least two other net wires and/or pins, a junction will automatically be placed. This function can be disabled with "SET AUTO_JUNCTION OFF;", or by unchecking "Options/Set/Misc/Auto set junction".
If the curve or @radius parameter is given, an arc can be drawn as part of the net (see the detailed description in the LINE command).
If no net name is included in the command line and the net is not started on a bus, then a name in the form of N$1 is automatically allocated to the net.
Nets or net segments that run over different sheets of a schematic and use the same net name are connected.
Net names should not contain a comma (','), because this is the delimiting character in busses. Net names should also not contain '[' and ']', because they are used to specify a range in a bus. Nets from such a range have the index w/o these brackets. (E.g. the bus D[0..15] has the according nets: D0, D1, ...)
SET NET_WIRE_WIDTH width;(Default: 6 mil).
!RESETwhich would result in
_____ RESETYou can find further details about this in the description of the TEXT command.
The OPEN command is used to open an existing library or create a new library. Once the library has been opened or created, an existing or new symbol, device, or package may be edited.
This command is mainly used in script files.
To switch to the library editor
OPEN .lbrcan be used.
The OPTIMIZE command joins wire segments which lie in one straight line. The individual segments must be on the same layer and have the same width. This command is useful to reduce the number of objects in a drawing and to facilitate moving a complete track instead of individual segments.
If a signal, net or bus name is given, or such an object is selected, the command affects only the respective object.
Note that when selecting a wire without name, all unnamed wires of the drawing are optimized.
Note that when selecting a group of objects, only actual signal resp. net or bus wires are optimized. To optimize all wires in a drawing, do
OPTIMZE;
SET OPTIMIZING OFF;or you have clicked the same spot twice with the SPLIT command.
The OPTIMIZE command works in any case, no matter if Optimizing
is enabled or disabled.
PACKAGE
See also CONNECT,
TECHNOLOGY,
PREFIX
PACKAGE pname vname
PACKAGE pname@lname vname
PACKAGE name
PACKAGE -old_name new_name
PACKAGE -name
This command is used in the device edit mode to define, delete or rename a package variant. In the schematic or board editor the PACKAGE command behaves exactly like "CHANGE PACKAGE".
Without parameters a dialog is opened that allows you to select a package and define this variant's name.
The parameters pname vname assign the package pname to the new variant vname.
The notation pname@lname vname fetches the package pname from library lname and creates a new package variant. This can also be done through the library objects' context menu or via Drag&Drop from the Control Panel's tree view.
The single parameter name switches to the given existing package
variant.
Compatibility with version 3.5:
If no package variants have been defined yet, and a package of the
given name exists, a new package variant named '' (an "empty" name)
with the given package will be created.
If -old_name new_name is given, the package variant old_name is renamed to new_name.
The single parameter -name deletes the given package variant.
The name of a package variant will be appended to the device set name to form the full device name. If the device set name contains the character '?', that character will be replaced by the package variant name. Note that the package variant is processed after the technology, so if the device set name contains neither a '*' nor a '?' character, the resulting device name will consist of device_set_name+technology+package_variant.
Following the PACKAGE command, the CONNECT command is used to define the correspondence of pins in the schematic device to pads on the package.
When the BOARD command is used in schematic editing mode to create a new board, each device is represented on a board layout with the appropriate package as already defined with the PACKAGE command.
Note that supply or external devices are no longer treated as such, as soon as packages are assigned.
The pins have to be connected with pads then.
PAD
See also SMD,
CHANGE,
DISPLAY,
SET,
NAME,
VIA,
Design Rules
The PAD command is used to add pads to a package. When the PAD command is active, a pad symbol is attached to the cursor and can be moved around the screen. Pressing the left mouse button places a pad at the current position. Entering a number changes the diameter of the pad (in the actual unit). Pad diameters can be up to 200 mm (7.7840 inch).
The orientation (see description in ADD) may be any angle in the range R0...R359.9. The S and M flags can't be used here.
PAD 0.06 The pad will have a diameter of 0.06 inch, provided the actual unit is "inch". This diameter remains as a presetting for successive operations.
Square | ||
Round | ||
Octagon | octagonal | |
Long | elongated | |
Offset | elongated with offset |
These shapes only apply to the outer layers (Top and Bottom). In inner layers the shape is always "round".
With elongated pads, the given diameter defines the smaller side of the pad. The ratio between the two sides of elongated pads is given by the parameter Shapes/Elongation in the Design Rules of the board (default is 100%, which results in a ratio of 2:1).
The pad shape or diameter can be selected while the PAD command is active, or it can be changed with the CHANGE command, e.g.:
CHANGE SHAPE OCTAGON The drill size may also be changed using the CHANGE command. The existing values then remain in use for successive pads.
Because displaying different pad shapes and drill holes in their real size slows down the screen refresh, EAGLE lets you change between real and fast display mode by the use of the SET commands:
SET DISPLAY_MODE REAL | NODRILL;Note that the actual shape and diameter of a pad will be determined by the Design Rules of the board the part is used in.
The following conditions apply:
SET PAD_NAMES OFF | ON;
NOSTOP | don't generate solder stop mask | |
NOTHERMALS | don't generate thermals | |
FIRST | this is the "first" pad (which may be drawn with a special shape) |
By default a pad automatically generates solder stop mask and thermals as necessary.
However, in special cases it may be desirable to have particular pads not do this.
The above NO... flags can be used to suppress these features.
If the Design Rules of a given board specify that the
"first pad" of a package shall be drawn with a particular shape, the pad marked with
the FIRST flag will be displayed that way.
A newly started PAD command resets all flags to their defaults. Once a flag is given
in the command line, it applies to all following pads placed within this PAD command
(except for FIRST, which applies only to the pad immediately following this
option).
See the ADD command for an explanation of orientation.
Using the commands GROUP, CUT, and PASTE, parts of a drawing/library can be copied to the same or different drawings/libraries. When using the PASTE command, the following points should be observed:
Assume you have a consistent board/schematic pair that contains the design of an amplifier, where the schematic may consist of several sheets. Now if you want to place this amplifier several times into your project, you can simply do
PASTE 100 amplifier.sch PASTE 200 amplifier.sch This example also shows the use of an offset, which adds the given value to all part and net names in the pasted files (unless they retain their name, see below). So the first amplifier channel will have all parts and nets named starting at 100, while the second one will have them start at 200. If no offset is given, new names are generated as necessary.
Just like in a normal PASTE operation, when pasting from a file, nets that have a label or are connected to a supply pin, retain their name while all others will get newly generated names. It is enough for a net to retain its name if it is labeled or connected to a supply pin on one sheet, even if it appears on several sheets.
Unless the PASTE operation is done in a script file, you will be offered a dialog that shows all the net names. By clicking on the names in the "New name" column you can edit individual net names. Icons indicate whether a net in the pasted drawing has a label or a supply pin, and whether the net will be connected to an existing net with the same name in the edited drawing.
If you paste a schematic into a schematic drawing, all sheets of the pasted schematic will be added as separate new sheets to the edited drawing. The corresponding board (if any) will be placed below the existing content of the edited board drawing. If you want to have explicit control over where the board is placed, you can perform the PASTE operation in the board, in which case the schematic sheets will be added just the same, but the board will be attached to the mouse cursor and you will be able to place it exactly where you want it.
For global settings in the files like layer definitions, netclasses, design rules
and autorouter parameters this holds: The settings of the currently opened drawing
are kept. This means e.g., that for the pasted data the restring parameters of
current drawing are used which can lead to differences compared to source drawing.
Please consider running a DRC for this.
Additional settings like additioal layers or netclasses are added to the current
drawing, of course.
You can also paste from a file using Drag&Drop, by pressing the Ctrl key when dropping the file.
If the file name could be mistaken as an orientation or an offset value, you can enclose it in single quotes.
A design block may contain a board and a schematic. It will paste all data it can.
If there is only an opened schematic, it will paste only the schematic part of the design block,
accordingly for boards. To paste both, a consistent pair has to be loaded.
If the command is started from board editor, it has the same behavior like pasting from a drawing file.
The board can be placed by mouseclick and new sheets are added to schematic.
If the command is started from schematic editor and the design block has only one sheet,
it can be placed by mouseclick into the current sheet as well. No automatic placement into
new sheets is done in that case.
PIN
See also NAME,
SHOW,
CHANGE
Direction
Function
Length
Orientation
Visible
Swaplevel
NC | not connected | |
In | input | |
Out | output (totem-pole) | |
IO | in/output (bidirectional) | |
OC | open collector or open drain | |
Hiz | high impedance output (e.g. 3-state) | |
Pas | passive (for resistors, capacitors etc.) | |
Pwr | power input pin (Vcc, Gnd, Vss, Vdd, etc.) | |
Sup | general supply pin (e.g. for ground symbol) |
Default: IO
If Pwr pins are used on a symbol and a corresponding Sup pin exists on the schematic, nets are connected automatically. The Sup pin is not used for components.
None | no special function | |
Dot | inverter symbol | |
Clk | clock symbol | |
DotClk | inverted clock symbol |
Default: None
Point | pin with no connection or name | |
Short | 0.1 inch long connection | |
Middle | 0.2 inch long connection | |
Long | 0.3 inch long connection |
Default: Long
R0 | connection point on the right | |
R90 | connection point above | |
R180 | connection point on the left | |
R270 | connection point below |
Default: R0
Off | pin and pad name not drawn | |
Pad | pad name drawn, pin name not drawn | |
Pin | pin name drawn, pad name not drawn | |
Both | pin and pad name drawn |
Default: Both
Default: 0
If a name is used in the PIN command, it must be enclosed in apostrophes. Pin names can be changed in the symbol edit mode using the NAME command.
PIN 'D0' *and the location for the other pins defined with a mouse click for each.
The SHOW command may be used to show pin options such as Direction and Swaplevel.
For example, suppose that three pins are required for GND. The pins are allocated the names GND@1, GND@2 and GND@3 during the symbol definition. Then only the characters before the "@" sign appear in the schematic.
It is not possible to add or delete pins in symbols which are already used by a device because this would change the pin/pad allocation defined with the CONNECT command.
!RESETwhich would result in
_____ RESETYou can find further details about this in the description of the TEXT command.
The PINSWAP command is used to swap pins within the same symbol which have been allocated the same swaplevel (> 0). Swaplevel, see PIN command. If a board is tied to a schematic via Back Annotation two pads can only be swapped if the related pins are swappable.
On a board without a schematic this command permits two pads in the same package to be swapped. The Swaplevel is not checked in this case.
Wires attached to the swapped pins are moved with the pins so that
short circuits may appear. Please perform the DRC and correct possible
errors.
POLYGON
See also CHANGE,
DELETE,
RATSNEST,
RIPUP,
LINE,
MITER
The POLYGON command is used to draw polygon areas. Polygons in the layers Top, Bottom, and Route2..15 are treated as signals. Polygons in the layers t/b/vRestrict are protected areas for the Autorouter.
If the curve or @radius parameter is given, an arc can be drawn as part of the polygon definition (see the detailed description in the LINE command).
If you want to give the polygon a name that starts with a digit (as in 0V), you must enclose the name in single quotes to distinguish it from a width value.
The parameters Isolate and Rank only have a meaning for polygons in the signal layers.
To withdraw a mistake, always the last wire piece of the polygon can be removed with the ESCape key.
1. Outlines | only the outlines as defined by the user are displayed. | |
2. Real mode | all of the areas are visible as calculated by the program. |
In "outlines" mode a polygon is drawn with dotted wires, so that it can be distinguished from other wires. The board file contains only the "outlines".
The default display mode is "outlines" as the calculation is a time consuming operation.
When a drawing is generated with the CAM Processor all polygons are calculated.
The RATSNEST command starts the calculation of the polygons (this can be turned off with SET POLYGON_RATSNEST OFF;). Clicking the STOP button terminates the calculation of the polygons. Already calculated polygons are shown in "real mode", all others are shown in "outline mode".
The RIPUP command changes the display mode of a polygon to "outline".
CHANGE operations re-calculate a polygon if it was shown in "real mode" before.
SPLIT: Inserts a new polygon edge.
DELETE: Deletes a polygon corner (if only three corners are left the whole polygon is deleted).
CHANGE LAYER: Changes the layer of the whole polygon.
CHANGE WIDTH: Changes the parameter width of the whole polygon.
MOVE: Moves a polygon edge or corner (like wire segments).
COPY: Copies the whole polygon.
NAME: If the polygon is located in a signal layer the name of the signal is changed.
Under certain circumstances, especially with Orphans = Off, a polygon can disappear completely. In that case the polygon's original outlines will be displayed on the screen, to make it possible to delete or otherwise modify it. When going to the printer or CAM Processor these outlines will not be drawn in order to avoid short circuits. A polygon is also displayed with its original outlines if there are other non-polygon objects in the signal, but none of them is connected to the polygon.
When calculating whether such an object is actually solidly connected to the hatched polygon, it is reduced to several "control points". For a round pad, for instance, these would be the north, east, west and south point on the pad's circumference, while for a wire it's the two end points. A solid connection is considered to exist if there is at least one line in the calculated polygon (outline or hatch line) that runs through these points with its center line.
Thermal and annulus rings inside a hatched polygon that do not have solid contact to any of the polygon lines are not generated.
Only polygons in signal layers can have the pour style "Cutout".
The outlines of a cutout polygon are always drawn as dotted lines on the screen, even after the signal polygons have been calculated using RATSNEST.
The wire width of a cutout polygon is taken into account when subtracting it from
other signal polygons. It may be arbitrarily small (even zero) without causing large
amounts of CAM data (as opposed to "solid" polygons, where the wire width should
not be too small).
PORT
See also MODULE
PORT 'module' 'net_name' options ..
PORT 'module' 'net_name' options|DELETE
The PORT command is used to add ports to modules used in hierarchical schematics.
The position and orientation are calculated automatically on the closest side of the module symbol.
A port exports a net of a module to the outside and defines a connection point for another net. The net connected to the port provides the common name and class.
If a simple bus name for net_name is used (see Names), this port exports all nets of that bus at once to the outside and defines a connection point for a proper bus.
If a net of a MODULE has an external connection through a PORT, the net class of the net on this port is overwriting the net class of the net in the module.
The port name can even be a simple bus name with a single range like 'PA[0..7]' (synonyms are not allowed).
NC | not connected | |
In | input | |
Out | output (totem-pole) | |
IO | in/output (bidirectional) | |
OC | open collector or open drain | |
Hiz | high impedance output (e.g. 3-state) | |
Pas | passive (for resistors, capacitors etc.) | |
Pwr | power input pin (Vcc, Gnd, Vss, Vdd, etc.) |
Default: IO
In module context the direction of already existing ports can be changed.
The INFO command can be used to get the port properties
by selecting it with
If connected with a net, the selection can be ambigous. Please use PREFIX
See also CONNECT,
MODULE,
PACKAGE,
VALUE
This command is used in the device editor mode to determine the initial characters of automatically generated symbol names when a symbol is placed in a schematic using the ADD command.
This command can also be used if editing a sheet of a module to set the prefix of this module.
PREFIX U;If this command is used when editing, for example, a 7400 device, then gates which are later placed in a schematic using the ADD command will be allocated the names U1, U2, U3 in sequence. These names may be changed later with the NAME command.
The PRINT command prints the currently edited drawing to the system printer.
Colors and fill styles are used as set in the editor window. This can be changed with the SOLID and BLACK options. The color palette used for the printout is always that for white background.
If you want to print pads and vias "filled" (without the drill holes being visible), use the command
SET DISPLAY_MODE NODRILL;Please note that polygons in boards will not be automatically calculated when printing via the PRINT command! Only the outlines will be drawn. To print polygons in their calculated shape you have to use the RATSNEST command before printing.
You can enter a factor to scale the output.
The limit parameter is the maximum number of pages you want the output to use. The number has to be preceded with a '-' to distinguish it from the factor. In case the drawing does not fit on the given number of pages, the factor will be reduced until it fits. Set this parameter to -0 to allow any number of pages (and thus making sure the printout uses exactly the given scale factor).
If the PRINT command is not terminated with a ';', a print dialog will allow you to set print options. Note that options entered via the command line will not be stored permanently in the print setup unless they have been confirmed in the print dialog (i.e. if the command has not been terminated with a ';').
The following options exist:
MIRROR | mirrors the output | |
ROTATE | rotates the output by 90° | |
UPSIDEDOWN | rotates the drawing by 180°. Together with ROTATE, the drawing is rotated by a total of 270° | |
BLACK | ignores the color settings of the layers and prints everything in black | |
SOLID | ignores the fill style settings of the layers and prints everything in solid | |
CAPTION | prints a caption at the bottom of the page | |
FILE | prints the output into a file; the file name must immediately follow this option | |
PRINTER | prints to a specific printer; the printer name must immediately follow this option | |
PAPER | prints on the given paper size; the paper size must immediately follow this option | |
SHEETS | prints the given range of sheets; the range (from-to) must immediately follow this option | |
ALIGN | prints in a given alignment; the alignment setting must immediately follow this option | |
WINDOW | prints the currently visible window selection of the drawing | |
PORTRAIT | prints in portrait orientation | |
LANDSCAPE | prints in landscape orientation | |
HIERARCHY | prints sheets of modules in hierarchical use |
If any of the options MIRROR...CAPTION is preceeded with a '-', that option is turned off in case it is currently on (from a previous PRINT). A '-' by itself turns off all options.
If the output file name has an extension of ".pdf" (case insensitive), a PDF file will be created. A PDF file can also be created by selecting "Print to File (PDF)" from the "Printer" combo box in the print dialog. Texts in a PDF file can be searched in a PDF viewer, as long as they are not using the vector font.
If the output file name has an extension of ".ps" (case insensitive), a Postscript file will be created.
If the file name is only an "*" or "*.ext" (an asterisk followed by an extension, as in "*.pdf", for instance), a file dialog will be opened that allows the user to select or enter the actual file name.
If the file name is only an extension, as in ".pdf", the output file name will be the same as the drawing file name, with the extension changed to the given string.
The file name may contain one or more of the following placeholders, which will be replaced with the respective string:
%E | the loaded file's extension (without the '.') | |
%N | the loaded file's name (without path and extension) | |
%P | the loaded file's directory path (without file name) | |
%% | the character '%' |
For example, the file name
%N.cmp.pdf
would create boardname.cmp.pdf.
If both the FILE and the PRINTER option are present, only the last one given will be taken into account
Width x Height Unit(without blanks), as in
PRINT PAPER 200x300mm PRINT PAPER 8.0x11.5inchWidth and Height can be floating point numbers, and the Unit may be either mm or inch (the latter may be abbreviated as in). Paper names must be given in full, and are case insensitive. If both the PRINTER and PAPER option are used, the PRINTER option must be given first. Custom paper sizes may not work with all printers. They are mainly for use with Postscript or PDF output.
opens the print dialog in which you can set print options | ||
PRINT; | immediately prints the drawing with the default options | |
PRINT - MIRROR BLACK SOLID; | prints the drawing mirrored, with everything in black and solid | |
PRINT 2.5 -1; | prints the drawing enlarged by a factor of 2.5, but makes sure that it does not exceed one page | |
PRINT FILE .pdf; | prints the drawing into a PDF file with the same name as the drawing file | |
PRINT SHEETS 2-15 FILE .pdf; | prints the sheets 2 through 15 into a PDF file with the same name as the drawing file | |
PRINT SHEETS ALL; | prints all sheets of the main schematic and of all modules as drawn | |
PRINT HIERARCHY SHEETS ALL; | prints all sheets of the main schematic and all sheets of the modules according to their module instances |
You can also exit from EAGLE at any time by pressing Alt+X.
RATSNEST
See also SIGNAL,
MOVE,
POLYGON,
RIPUP
RATSNEST signal_name ..
RATSNEST ! signal_name ..
The RATSNEST command assesses the airwire connections in order to achieve the shortest possible paths, for instance, after components have been moved. After reading a netlist via the SCRIPT command, it is also useful to use the RATSNEST command to optimize the length of airwires.
The RATSNEST command also calculates all polygons belonging to a
signal. This is necessary in order to avoid the calculation of
airwires for pads already connected through polygons. All of the calculated
polygon areas are then being displayed in the "real mode".
You can switch back to the faster
"outline mode" with the RIPUP command.
The automatic calculation of the polygons can be turned off with
SET POLYGON_RATSNEST OFF;Note that RATSNEST doesn't mark the board drawing as modified, since the calculated polygon data (if any) is not stored in the board, and the recalculated airwires don't really constitute a modification of the drawing.
Such zero length airwires can be picked up with the ROUTE command just like ordinary airwires. They may also be handled by placing a VIA at that point.
Ratsnest: Nothing to do!Otherwise, if there are still airwires that have not been routed, the message
Ratsnest: xx airwires.will be displayed, where xx gives the number of unrouted airwires.
* | matches any number of any characters | |
? | matches exactly one character | |
[...] | matches any of the characters between the brackets |
If any of these characters shall be matched exactly as such, it has to be enclosed in brackets. For example, abc[*]ghi would match abc*ghi and not abcdefghi.
A range of characters can be given as [a-z], which results in any character in the range 'a'...'z'.
To hide airwires the RATSNEST command can be given the exclamation mark ('!'), followed by a list of signals, as in
RATSNEST ! GND VCCwhich would hide the airwires of the signals GND and VCC.
RATSNEST GND VCCThis will activate the display of the airwires of the signals GND and VCC and also recalculates them. You can also recalculate the airwires (and polygons) of particular signals this way.
The signal names may contain wildcards, and the two variants may be combined, as in
RATSNEST D* ! ?GND VCCwhich would recalculate and display the airwires of all signals with names beginning with 'D', and hide the airwires of all the various GND signals (like AGND, DGND etc.) and the VCC signal. Note that the command is processed from left to right, so in case there is a DGND signal the example would first process it for display, but then hide its airwires.
To make sure all airwires are displayed enter
RATSNEST *Note that the SIGNAL command will automatically make the airwires of a signal visible if a new airwire is created for that signal. The RIPUP command on the other hand will not change the state of hiding airwires if a wire of a signal is changed into an airwire.
The RECT command is used to add rectangles to a drawing. The two points define two opposite corners of the rectangle. Pressing the center mouse button changes the layer to which the rectangle is to be added.
The orientation (see description in ADD) may be any angle in the range R0...R359.9. The S and M flags can't be used here. Note that the coordinates are always defined at an orientation of R0. The possibility of entering an orientation in the RECT command is mainly for use in scripts, where the rectangle data may have been derived through a User Language Program from the UL_RECTANGLE object. When entering a non-zero orientation interactively, the corners of the rectangle may not appear at the actual cursor position. Use the ROTATE command to interactively rotate a rectangle.
In EAGLE it is possible to reverse previous actions with the UNDO command. These actions can be executed again by the REDO command. UNDO and REDO operate with a command memory which exists back to the last EDIT, OPEN or REMOVE command.
UNDO/REDO is completely integrated within Forward&Back Annotation.
REMOVE
See also OPEN,
RENAME,
MODULE
REMOVE name.Sxx
REMOVE name.mod
REMOVE name.Mxx
Symbols and packages can be erased from a library only if not used by a device.
REMOVE in a library clears the UNDO buffer.
REMOVE .S3deletes sheet number 3 from the presently loaded schematic.
If you delete the currently loaded sheet, sheet number 1 will be loaded after the command has been executed. All sheets with a higher number than the one deleted will get a number reduced by one.
REMOVE name.mod REMOVE name.m3
In the library editor the RENAME command is used to change the name of a symbol, device or package in the currently opened library. In the schematic editor modules of the current schematic can be renamed this way.
The names may include extensions (for example RENAME name1.pac name2[.pac] - note that the extension is optional in the second parameter). If the first parameter is given without extension in the library editor, you have to be in the respective mode to rename an object (i.e. editing a package if you want to rename packages). Supported extensions are '.pac', 'sym', '.dev' and '.mod' for packages, symbols, devices and modules.
RENAME clears the UNDO buffer.
REPLACE
See also SET,
UPDATE
REPLACE device_name[@library_name] ..
REPLACE part_name device_name[@library_name] ..
REPLACE package_name ..
REPLACE element_name package_name ..
The REPLACE command can be used to replace a part with a different device (even from a different library). The old and new device must be compatible, which means that their used gates and connected pins/pads must match, either by their names or their coordinates.
Without parameters the REPLACE command opens a dialog from which a device can be selected from all libraries that are currently in use. After such a device has been selected, subsequent mouse clicks on parts will replace those parts' devices with the selected one if possible.
If a device_name is given, that device will be used for the replace operation.
With both a part_name and a device_name, the device of the given part will be replaced (this is useful when working with scripts).
If a library_name is given and it contains blanks, the whole device_name@library_name needs to be enclosed in single quotes.
If only a board is being edited (without a schematic), or if elements in the board are being replaced that have no matching part in the schematic, the REPLACE command has two different modes that are chosen by the SET command.
The first mode (default) is activated by the command:
SET REPLACE_SAME NAMES;In this mode the new package must have the same pad and smd names as the old one. It may be taken from a different library and it may contain additional pads and smds. The position of pads and smds is irrelevant.
The second mode is activated by the command
SET REPLACE_SAME COORDS;In this mode, pads and smds of the new package must be placed at the same coordinates as in the old one (relative to the origin). Pad and smd names may be different. The new package may be taken from a different library and may contain additional pads and smds.
Pads of the old package connected with signals must be present in the new package. If this condition is true the new package may have less pads than the old one.
REPLACE functions only when the appropriate tOrigins/bOrigins layer is displayed.
If there is already a package with the same name (from the same library) in the drawing, and the library has been modified after the original object was added, an automatic library update will be started and you will be asked whether objects in the drawing shall be replaced with their new versions.
Note: A REPLACE operation automatically updates all involved library objects
as necessary. This means that other parts (on other schematic sheets or in
other locations on the board) may be changed, too.
You should always run a Design Rule Check (DRC) and an
Electrical Rule Check (ERC) after a REPLACE operation!
RIPUP
See also DELETE,
GROUP,
POLYGON,
RATSNEST
Changes the display of polygons to "outlines".
RIPUP [ @ ] [ ! ] ..
RIPUP [ @ ] [ ! ] signal_name..
The RIPUP command changes routed wires (tracks) into airwires. That can be done for:
RIPUP signal_name..rips up the complete signal "signal_name", but only if it is connected to elements (several signals may be listed, e.g. RIPUP D0 D1 D2;).
RIPUP ..rips up segments selected by the mouse click up to the next pad/smd.
RIPUP;removes only signals which are connected to elements (e.g. board crop marks are not affected). The same applies if RIPUP is used on a group.
Note: in all cases the RIPUP command only acts on objects that are in layers that are currently visible!
* | matches any number of any characters | |
? | matches exactly one character | |
[...] | matches any of the characters between the brackets |
If any of these characters shall be matched exactly as such, it has to be enclosed in brackets. For example, abc[*]ghi would match abc*ghi and not abcdefghi.
A range of characters can be given as [a-z], which results in any character in the range 'a'...'z'.
The ROTATE command is used to change the orientation of objects.
If orientation (see description in ADD) is given, that value will be added to the orientation of the selected object instead.
Prepending orientation with the character '=' causes the value not to be added, but instead to be set absolutely.
Parts, pads, smds and pins can also be selected by their name, which is especially useful if the object is outside the currently shown window area. For example
ROTATE =MR90 IC1
would set the orientation of element IC1 to MR90, regardless of its previous setting.
Attributes of parts can be selected by entering the concatenation of part name and attribute name, as in R5>VALUE.
The quotes around name are necessary to distinguish it from an orientation parameter as in
ROTATE R45 'R1'They can be left away if the context is clear.
You can use Click&Drag to rotate an object by any angle. Just click on the object and move the mouse (with the mouse button held down) away from the object. After having moved the mouse a short distance, the object will start rotating. Move the mouse until the desired angle has been reached and then release the mouse button. If, at some point, you decide to rather not rotate the object, you can press the ESCape key while still holding the mouse button pressed. The same operation can be applied to a group by using the right mouse button. The group will be rotated around the point where the right mouse button has been pressed down.
Parts cannot be rotated if they are locked, or if any of their connected pads would extend outside the allowed area (in case you are using a limited edition of EAGLE).
Elements can only be rotated if the appropriate tOrigins/bOrigins layer is visible.
If you want to have text that is printed "upside down", you can set the "Spin"
flag for that text.
See also AUTO,
UNDO,
LINE,
MITER,
SIGNAL,
SET,
RATSNEST
The ROUTE command activates the manual router which allows you to
convert airwires (unrouted connections) into real wires.
Select a signal object (pad, via, wire, or airwire) to begin routing. When your
selection point lies on co-located objects, the ROUTE command resolves ambiguity
by selecting an object using the following priority:
Use left mouse button as you reach each location on the design layout where you would
like to commit the intermediate (dragged) wires. This places the wires, and begins a
new routed segment from that location.
As you proceed through the process of routing wires, you can also initiate layer changes
using the center mouse button, the Space key, and Shift+Space keys. A layer change
automatically produces a via that drags at the end of the intermediate routes, at the
cursor location. When you use the left mouse button to commit the routes (and the via
location), then the new route segments commence on the newly targeted layer from the
via location. Incidentally, you can force placement of a via without changing layers,
by combining a left mouse with the Shift key.
When the ROUTE command creates and places a via, it uses the minimum layer span necessary
to traverse between layers (according to existing design conditions and the layer setup
in the Design Rules). If the routed sequence begins or ends
at an SMD pad, and a via is required at that location to immediately traverse to the neighboring
layer, then a micro via will be used (if micro vias have been enabled in the
Design Rules).
While the ROUTE command is active you can enter the desired wire width
from the keyboard.
If the curve or @radius parameter is given, an arc can be drawn as part of the track
(see the detailed description in the LINE command).
If you provide a name in the command, the airwire of that signal that is
closest to the mouse cursor is selected. If name could be interpreted
as a width, curve or @radius then you should enclose it in
single quotes.
Ignore Obstacles allows you to place wires and vias at any location on the design layout, regardless
of the design rules. Walkaround Obstacles adheres to the design rules. In this mode, the
command identifies objects that lie in the path of your routed wires, and avoids these
obstacles by automatically contouring around them. Additionally, when you change layers
within the Route command, prompting placement of a via, the command automatically finds
the nearest valid via placement location (again, in compliance with the design rules).
When you select an airwire for routing that starts at an existing wire, the
routed wire width will automatically initialize to the width of the existing wire,
if the Shift key is pressed when selecting the airwire.
NOTE: Backspace / delete keys are only operational within the ROUTE command when
the command window is empty of text. Otherwise, Backspace / delete keys are processed
as normal by the command window.
You can start your re-route at a pad, a via, a wire(s) vertex, or in the middle of a
wire, and terminate your re-route in the same fashion. The default setting of the
Loop Remove mode is ON. Beware that there are a few conditions required for Loop
Remove to operate properly:
Wire bend style 8 routes only the shorter side of the selected airwire,
while 9 routes both sides. Once the automatic routing process is complete
(which may take a while, so be patient), the airwire will be replaced by the
actual routed wires and vias. If the routing couldn't be completed (for instance
due to Design Rules restrictions), the cursor changes into a "forbidden" sign.
With bend style 9 it is possible that only one side of the airwire can
be routed, while the other side can't.
Whenever the mouse is moved, any previous result is discarded and a new calculation
is started. Once the result is acceptable, just click the left mouse button to
place it.
The Follow-me router works by marking the grid point at the current mouse position
as a starting point, and uses the Autorouter to find a path from that point to any
point along the signal segment at which the selected airwire ends (which is not
necessarily the exact end point of the airwire). The starting point also considers
the currently selected layer, so don't be surprised if the router places a via
at that point. By changing the current layer you can influence the routing result.
The routing grid is taken from the actual grid setting at the time the airwire
is selected.
The routing parameters (like cost factors, preferred directions etc.) are those defined
in the dialog of the AUTO command.
The following particularities apply:
Snap Function, Undo Commit Sequence, and Loop Remove features are not currently
operational in Follow-me Router mode.
The following particularities apply:
Snap Function, Undo Commit Sequence, and Loop Remove features are not currently
operational in Differential Pair routing mode.
The RUN command starts the User Language Program from the file file_name.
Started from a context menu the according object is assigned to a group.
It can be identified with the builtin function ingroup()
for further processing. In case of a wire the group bits are set according to it's selection state
(first, second or both endpoints). This allows to find which endpoint has been selected.
A previously defined group becomes invalid.
The SCRIPT command is used to execute sequences of commands that are
stored in a script file. If SCRIPT is typed in at the keyboard and "file_name"
has no extension, the program automatically uses ".scr".
Please refer to the EXPORT command for different possibilities
of script files.
If the SCRIPT command is selected with the mouse, a popup menu will
show all of the files which have the extension ".scr" so that
they can be selected and executed.
The SCRIPT command provides the ability to customize
the program according to your own wishes. For instance:
EDITOR:
where EDITOR is one of SCH, BRD, LBR, DEV, PAC and SYM. This ensures that only the appropriate
section is executed in the editor. For example, when a new board is opened, only the section
starting with BRD: is executed (until the next label if any). This also offers the
possibility for editor specific menus using the MENU command.
The label must be at the line beginning.
A dialog in which all the parameters can be set appears if the SET command is entered without parameters.
The color palettes can be modified either through the dialog under
"Options/Set.../Colors" or by using the command
By default only the palette entries 0..15 are used and they contain the
colors listed below.
The palette entries are grouped into "normal" and "highlight" colors. There
are always 8 "normal" colors, followed by the corresponding 8 "highlight"
colors. So colors 0..7 are "normal" colors, 8..15 are their "highlight"
values, 16..23 are another 8 "normal" colors with 24..31 being their
"highlight" values and so on. The "highlight" colors are used to visualize
objects, for instance in the SHOW command.
Color, listed according to color numbers, which can be used instead of the color names. Used to specify colors:
Fill specifies the style with which wires and rectangles in a particular layer are to be filled. This parameter can also be replaced with the number at the beginning of each line:
There are the key words OPT1..9 to confirm dialogs with additional options
(e.g. renaming a net segment or a signal polygon).
You should not put a SET CONFIRM YES at the beginning of a script
and then execute lots of commands "silently". It is better to explicitly
put this around individual commands, as in
Example
The SHOW command is used to highlight objects.
Details are listed in the status bar.
Complete signals and nets can be highlighted with the SHOW command.
If a bus is selected, all nets belonging to that bus will also be
highlighted.
If several names are entered in one line, all matching objects are
highlighted at the same time.
If any of these characters shall be matched exactly as such, it has to be enclosed
in brackets. For example, abc[*]ghi would match abc*ghi and not
abcdefghi.
A range of characters can be given as [a-z], which results in any character
in the range 'a'...'z'.
The special pattern [number..number] forms a bus name range
and is therefore not treated as a wildcard pattern in a schematic.
The SIGNAL command is used to define signals (connections between
the various packages). The user must define a minimum of two element_name/pad_name
pairs, as otherwise no airwire can be generated.
If input with signal_name the signal will be allocated the specified
name.
The SLICE command is used to cut lines in two. This can be used to separate
board traces or schematic nets for rerouting. The width defines how much of
the line is removed by the slice. The amount of a line that is removed is the
larger of either the width setting or twice the line width.
Only lines from from displayed layers can be sliced. Air lines and polygons
are not sliced.
The SMASH command is used with parts or elements in order to separate the text
parameters indicating name, value or attributes. The text may
then be placed in a new and more convenient location with the MOVE
command.
Parts and elements can also be selected by their name,
which is especially useful if the object is outside the currently shown
window area. Note that when selecting a multi-gate part in a schematic by name,
you will need to enter the full instance name, consisting of part
and gate name.
Use of the SMASH command allows the text to be treated like any other
text, e.g. CHANGE SIZE, ROTATE, etc., but the actual text may not
be changed.
A "smashed" element can be made "unsmashed" by clicking on it with the
Shift key pressed (and of course the SMASH command activated).
The SMD command is used to add pads for surface mount devices to a
package. When the SMD command is active, an smd symbol is attached
to the cursor. Pressing the left mouse button places an smd pad at
the current position.
Entering numbers changes the x- and y-width of the smd pad, which
can be up to 200 mm (7.7840 inch). These parameters
remain as defaults for successive SMD commands and can be changed
with the CHANGE command. Pressing
the center mouse button changes the layer onto which the smd pad will be drawn.
The orientation (see description in ADD)
may be any angle in the range R0...R359.9. The S
and M flags can't be used here.
The following conditions apply:
By default an smd automatically generates solder stop mask, cream mask and thermals as necessary.
However, in special cases it may be desirable to have particular smds not do this.
The above NO... flags can be used to suppress these features.
The SPLIT command is used to split a wire (or segment) or a polygon
edge into two segments in order, for example, to introduce a bend.
This means you can split wires into parts that can be moved with the
mouse during the SPLIT command. A mouseclick defines the point at
which the wire is split. The shorter of the two new segments follows
the current wire bend rules and may therefore itself become two segments
(see SET Wire_Bend), the longer segment is a straight segment running
to the next end point.
If the curve or @radius parameter is given, an arc can be drawn as part of the wire segment
(see the detailed description in the LINE command).
On completion of the SPLIT command, the segments are automatically
rejoined if they are in line unless the command
This command is used in the device editor mode to define the possible technology
parts of a device name.
In the schematic or board editor the TECHNOLOGY command behaves exactly
like "CHANGE TECHNOLOGY".
Exactly one of the names given in the TECHNOLOGY command will
be used to replace the '*' in the device set name when an actual device is added
to a schematic.
The term technology stems from the main usage of this feature in creating
different variations of the same basic device, which all have the same schematic
symbol(s), the same package and the same pin/pad connections. They only differ in
a part of their name, which for the classic TTL devices is related to their
different technologies, like "L", "LS" or "HCT".
The TECHNOLOGY command can only be used if a package variant has been selected with the PACKAGE command.
If no '*' character is present in the device set name, the technology will
be appended to the device set name to form the full device name. Note that the technology
is processed before the package variant, so if the device set name contains neither
a '*' nor a '?' character, the resulting device name will consist
of device_set_name+technology+package_variant.
The names listed in the TECHNOLOGY command will be added to an already existing list
of technologies for the current device.
Starting a name with '-' will remove that name from the list of technologies.
If a name shall begin with '-', it has to be enclosed in single quotes.
Using -* removes all technologies.
Only ASCII characters in the range 33..126 may be used in technologies (lowercase characters
will be converted to uppercase).
The special "empty" technology can be entered as two single quotes ('', an empty string).
Note that the Technologies dialog contains all technologies from all devices in
the loaded library, with the ones referenced by the current device checked.
The TEXT command is used to add text to a library element or drawing.
When entering several texts it is not necessary to invoke the
command each time, as the text command remains active after placing
text with the mouse.
Text is always displayed so that it can be read from in front or from
the right - even if rotated. Therefore after every two rotations it
appears the same way, but the origin has moved from the lower left
to the upper right corner. Remember this if a text appears to be unselectable.
The reading direction for vertical texts can be changed from "up" to "down" in the
user interface dialog.
If you want to have text that is printed "upside down", you can set the "Spin"
flag for that text.
The text font can be changed with the CHANGE command:
If you set the option "Always vector font" in the user interface dialog,
all texts will always be displayed and printed using the builtin vector font,
independent from the settings of the individual texts and for each drawing.
This option is useful if the system doesn't display the other fonts correctly.
When creating a new board or schematic, the current setting of this option is stored
in the option "Persistent in this drawing" of the drawing file.
This makes sure that the drawing will be printed with the correct setting if
it is transferred to somebody else who has a different setting of this option.
When creating output files with the CAM Processor, texts will always be drawn with
Vector font. Other fonts are not supported.
If a text with a font other than Vector is subtracted from a signal
polygon, only the surrounding rectangle is subtracted. Due to the
above mentioned possible size/length problems, the actually printed
font may exceed that rectangle. Therefore, if you need to subtract
a text from a signal polygon it is recommended that you use the Vector
font.
The Ratio parameter has no meaning for texts with fonts other than Vector.
1) Only for package or symbol
The format in which a part cross-reference is displayed can be controlled
through the "Xref part format" string, which is defined in the "Options/Set/Misc"
dialog, or with the SET command.
The following placeholders are defined, and can be used in any order:
The default format string is "/%S.%C%R". Apart from the defined
placeholders you can also use any other ASCII characters.
Note that for each attribute name there should be only one such text in any given symbol
or package!
If there is more than one such text in a symbol or package that all reference the
same attribute name, only one of them will be displayed when the part using
this symbol or package is smashed.
The UNDO command allows you to cancel previously executed commands.
This is especially useful if you have deleted things by accident.
Multiple UNDO commands cancel the corresponding number of commands
until the last EDIT, OPEN or REMOVE command is reached.
The UNDO command uses up memory space. If you are short of
this you can switch off this function with the SET command
If you confirm this dialog with "OK", the drawing will be left in the
condition as selected in the list. If you cancel the dialog, it will be
restored to the condition it had before the dialog was opened.
CAUTION: this is a very powerful tool! By going all the way back in the
UNDO list (which can be done with a single mouse click) and executing any
new command, the undo buffer will be truncated at that point, and there
is no way back! So use this with care!
The UPDATE command checks the parts in a board or schematic against
their respective library objects and automatically updates them if
they are different. If UPDATE is invoked from the library editor, the
packages within the loaded library will be updated from the given
libraries.
If you activate the UPDATE command without a parameter, a file dialog will
be presented to select the library from which to update.
If one ore more libraries are given, only parts from those libraries will be checked.
The library names can be either a plain library name (like "ttl" or "ttl.lbr") or a full
file name (like "/home/mydir/myproject/ttl.lbr" or "../lbr/ttl").
If a library_name contains blanks, it needs to be enclosed in single quotes.
If the first parameter is '+@', the names of the given libraries (or all libraries,
if none are given) will get a '@' character appended, followed by a number.
This can be used to make sure the libraries contained in a drawing will not be modified when
a part from a newer library with the same name is added to the drawing. Library names that
already end with a '@' character followed by a number will not be changed.
If the first parameter is '-@', the '@' character (followed by a number) of the given
libraries (or all libraries, if none are given) will be stripped from the library name.
This of course only works if there is no library with that new name already in the drawing.
Please note that "UPDATE +@;" followed by "UPDATE -@;" (and vice versa) does not necessarily
result in the original set of library names, because the sequence in which the names are processed
depends on the sequence in which the libraries are stored in the drawing file.
The libraries stored in a board or schematic drawing are identified only by their
base name (e.g. "ttl"). When considering whether an update shall be performed,
only the base name of the library file name will be taken into account.
Libraries will be searched in the directories specified under "Libraries" in the
directories dialog, from left to right.
The first library of a given name that is found will be taken. Note that the library
names stored in a drawing are handled case insensitive. It does not matter whether
a specific library is currently "in use". If a library is not found, no update
will be performed for that library and there will be no error message.
Using the UPDATE command in a schematic or board that are connected via active
Forward&Back Annotation will act on both the
schematic and the board.
At some point you may need to specify whether gates, pins or pads shall
be mapped by their names or their coordinates. This is the case when the respective library
objects have been renamed or moved. If too many modifications have been made (for example, if
a pin has been both renamed and moved) the automatic update may not be possible. In that case
you can either do the library modification in two steps (one for renaming, another for moving),
or give the whole library object a different name.
When used with old_library_name = new_library_name (note that there has to be
at least one blank before and after the '=' character), the UPDATE command
locates the library named old_library_name in the current board or schematic,
and updates it with the contents of new_library_name. Note that old_library_name
must be the pure library name, without any path, while new_library_name
may be a full path name. If the update was performed successfully, the library in the current board/schematic file will
also be renamed accordingly - therefore this whole operation is, of course, only
possible if new_library_name has not yet been used in the current board or schematic.
Note: You should always run a Design Rule Check (DRC) and an
Electrical Rule Check (ERC) after a library update has been performed
in a board or a schematic!
By specifying the package name (package_name@library_name) you can have only a
specific package be replaced.
The USE command marks a library for later use with the
ADD or REPLACE command.
If you activate the USE command without a parameter, a file dialog
will appear that lets you select a library file.
If a path for libraries has been defined in the
"Options/Directories" dialog,
the libraries from the first entry in this path are shown in the file dialog.
The special parameter -* causes all previously marked libraries
to be dropped.
With -library_name the library library_name will be dropped.
library_name can be the full name of a library or it can contain
wildcards.
If library_name is the name of a directory, all libraries from
that directory will be marked.
The suffix .lbr can be omitted.
Note that when adding a device or package to a drawing, the complete library
information for that object is copied into the drawing file, so that
you don't need the library for changing the drawing later.
Changes in a library have no effect on existing drawings.
See the UPDATE command if you want to
update parts from modified libraries.
If you type in a value before you select an element, then all of the subsequently
selected elements receive this value. This is very useful if you want
for instance a number of resistors to have the same value.
If the parameters name and value are specified, the
element name gets the specified value.
The VALUE command can only be used in the default assembly variant.
If you want to change the value of another assembly variant,
you need to use the VARIANT command.
On: Permits the actual value to be changed in the schematic.
Off: Automatically enters the actual device name into the schematic
(e.g.74LS00N). The user can only modify this value after a confirmation.
By default all parts of the schematic are populated on the board (provided they
have a package). However, sometimes different variants of a design may require that
some parts are not populated, or that they have different values or technologies
than the default. The VARIANT command allows you to define which parts are actually
populated in a given assembly variant, and to give them particular values and
technologies.
name is the name of the variant. It is treated case-insensitive and must be
enclosed in single quotes if it contains blanks or '+' or '-'.
If part_name followed by the keyword POPULATE or NOPOPULATE
is given, a variant of the given name is created for that part, in which
it will be marked as either "populated" or "not populated".
Parts that are not populated in the current assembly variant are indicated with
an X drawn over their entire bounding rectangle in the schematic.
In the board anything that is related to actually placing the part on the board
(like placeplan, names, values etc.) is not drawn in such a case.
The optional value and technology (which is only applicable in a
schematic) can be used to further refine the variant.
A value may only be given if the part's device set has its "user value" parameter
enabled.
If only the technology shall be specified without using a different value, an
empty string ('') can be entered for the value.
A new variant can be created by preceding name with a '+'.
If a variant with that name already exists, nothing happens.
If the variant name is preceded with a '-', the given variant will be
deleted. If name is '*', all variants will
be deleted. Unless this command is used in a script, a confirmation
prompt will ask the user whether this action should really be taken.
Giving only a variant name will switch the whole project to that variant.
This means that all "populate" flags, values and technologies will appear as
specified in that variant for each part. Using an empty string ('')
here switches to the default assembly variant, which is the same as if there
were no variants at all.
Note that when loading a drawing it is always in its default state, with no
assembly variant selected.
If used without any parameters, a dialog will open that allows you to manage
all assembly variants.
The name of the current assembly variant can be displayed by using the
text variable >ASSEMBLY_VARIANT.
The commands ADD, CHANGE PACKAGE | TECHNOLOGY, REPLACE, UPDATE and VALUE
can only be used if no assembly variant is active.
The COPY command doesn't copy assembly variants.
In the board the VARIANT command is not supported, everything is controlled from
schematic if f/b annotation is active (the variant combobox in the board editor
is only for informational reasons). However, for standalone boards it's possible
to set the populate option of elements with the CHANGE
command or in the properties dialog.
The assembly variants of the schematic and assembly variants of modules are
completely independent. The VARIANT command is not intended to switch assembly
variants of a module.
Therefore for more clarity we distinguish between Module Assembly Variants
and Main Assembly Variants.
Within a module the VARIANT command refers to its module assembly variants,
on the schematic's main sheets it refers to the main assembly variants.
When the VIA command is active, a via symbol is attached to the cursor.
Pressing the left mouse button places a via at the current position.
The via is added to a signal if it is placed on an existing signal wire.
If you try to connect different signals, EAGLE will ask you if you really
want to connect them.
The drill diameter of the via is the same as the diameter set for
pads. It can be changed with
Square
These shapes only apply to the outer layers (Top and Bottom).
In inner layers the shape is always "round".
Vias generate drill symbols in the Drills layer and the solder
stop mask in the tStop/bStop layers.
Like the diameter, the via shape can be entered while
the VIA command is active, or it can be changed with the CHANGE command.
The shape then remains valid for the next vias and pads.
Note that the actual shape and diameter of a via will be determined by the
Design Rules of the board the via is used in.
By default a via with a drill diameter that is less than or equal to the value of
the Design Rules parameter "Masks/Limit" will not
have a solder stop mask. The above STOP flag can be used to force a solder
stop mask for a via.
You can specify an integer or real number as the argument to the WINDOW
command to scale the view of the drawing by the amount entered. The
center of the window remains the same.
When zooming very far into a drawing, the following things may happen:
The syntax to handle these aliases is:
WINDOW = MyWindow (0 0) (4 3);
Defines the alias "MyWindow" which, when used as in
WINDOW myw
will zoom to the given window area.
Note the abbreviated use of the alias and the case insensitivity.
The keyword 'WIRE' is deprecated. The WIRE command has been renamed to LINE
The file name may also be entered with a pathname if it is to
be saved in another directory. If no pathname is given, the file is
saved in the
project directory or design block directory (option DBL)
If the new name is preceded with a @, the name of the loaded
drawing will also be changed accordingly. The corresponding board/schematic
will then also be saved automatically under this name and the UNDO buffer
will be cleared.
If WRITE is selected from the menu, a popup window will appear asking
for the name to use (current drawing name is default). This name may
be edited and accepted by clicking the OK button. Pressing the ESCAPE
key or clicking the CANCEL button cancels the WRITE command.
To assure consistency for
Forward&Back Annotation
between board and schematic drawings, the WRITE
command has the following additional functionality:
If no name is given, a dialog for design block generation pops up. It additionally allows
entering an HTML description and attributes. In the upper left there is a preview of the description.
The description can be written in the text field below. Attributes can be managed in the bottom left.
There are also automatically generated attributes which are not editable.
The preview on the right side represents the drawing(s) to be included in the design block.
At the bottom you can enter the file name or select where to store it.
After having clicked this menu entry you do a selection in the first editor.
The selection works in additive mode and may be adjusted several times.
Deselection with Ctrl-Click is also supported.
The selection in the first editor can be finished with Ctrl-Rightclick.
There are a couple of criteria for such a selection that will be checked (see below).
If these criteria are not met, an according error message is displayed and the user
may continue the selection to correct his selection Ctrl-Rightclick again.
If there's only one editor open, the design block dialog like above pops up, presenting
current selection in the preview. The selection can be saved this way.
If both editors are open, with the Ctrl-Rightclick you can continue the selection
in the second editor.
See also PRINT
The remaining options are used for the page setup.
The remaining options are used for the page setup.
The default border values are taken from the printer driver, and define
the maximum drawing area your particular printer can handle. You can enter
smaller values here, but your printer hardware may or may not be able to
print arbitrarily close to the paper edges.
After changing the printer new hardware minimums may apply and your
border values may be automatically enlarged as necessary to comply with
the new printer. Note that the values will not be decreased automatically
if a new printer would allow smaller values. To get the smallest possible
border values you can enter 0 in each field, which will then be
limited to the hardware minimum.
The value in the X field is the calibration factor to use
in the print head direction, while the value in the Y field
is used to calibrate the paper feed direction.
IMPORTANT NOTE: When producing production layout drawings with
your printer, always check the final print result for correct measurements!
The default values of 1 assume that the printer produces exact
measurements in both directions.
If the drawing is mirrored, the word "mirrored" will appear in the caption,
and if the scale factor is not 1.0 it will be added as f=...
(the scale factor is given with 4 decimal digits, so even if f=1.0000
appears in the caption the scale factor will not be exactly 1.0).
The following help topics lead you through the necessary steps from
selecting a data file to configuring the output device:
See also printing to the system printer
A typical CAM Processor job could for example have two sections, one
that produces photoplotter data for the Top layer, and another that
produces the data for the bottom layer.
You can limit the size of the output to a given number of pages by entering
a negative number in the Scale field. In that case the default scale
factor will be 1.0 and will be decreased until the drawing just fits on the
given number of pages. For example, entering "-2" into this field will
produce a drawing that does not exceed two pages. Please note that for this
mechanism to work you will have to make sure that the page width and height
is set according to your output device. This setting can be adjusted in the
Width and Height fields or by editing the file eagle.def.
Please note that aperture emulation can cause very long plot times (costs!).
Tolerances are entered in percent.
Please be aware that your design rules might not be kept when allowing
tolerances!
This file can be generated with the help of a User Language Program called
drillcfg.ulp, that is stored in your EAGLE's ULP directory.
Use the RUN command to start it.
Tolerances are entered in percent.
Can be used to position the origin of plotters at the lower left corner.
Please note that the CAM Processor divides a drawing into several
parts if the rectangle which includes all objects of the file
(even the ones not printed) doesn't fit into the printable area.
The plotter default speed is selected with the value 0.
Please use a text editor which doesn't
place control characters into the file.
The following file names are commonly used:
For example, the output file definition
%N.cmp%I{.info}
would create boardname.cmp for the data file and boardname.cmp.info
for the info file (in case the selected output device generates an info file).
If you have selected an
output device
that supports colors, you can enter the color number
in the Color field of each layer.
The following layers and
output file names
are commonly used to create the output:
The User Language Program outlines.ulp implements the entire process
necessary to do this. The following is a detailed description of what exactly has to
be done to produce outlines data with EAGLE.
Non-zero values for the Isolate parameter can be used when working sequentially
with different milling tool diameters in order to avoid areas that have already
been milled.
With a schematic or board open, Under Options/Set/Misc, these new group-related features are
enabled by checking the box labeled "Group default on".
When Group default on is checked, the following features are enabled:
See also GROUP, MOVE, DELETE
The Autorouter is also used as "Follow-me" router in the
ROUTE command.
Please check your license
to see whether you have access to the Autorouter module.
The DRC is performed in a board window, and checks the design for overlaps,
distance violations etc.
The Design Rule Check checks the board against these rules
and reports any violations.
The Design Rules of a board can be modified through the Design Rules dialog, which
appears if the DRC command is selected without a terminating
';'.
Newly created boards take their design rules from the file 'default.dru',
which is searched for in the first directory listed in the "Options/Directories/Design rules" path.
If no such file is present, the program's builtin default values apply.
Note regarding the values for Clearance and Distance:
The accuracy is limited by the internal resolution of coordinates (1/320000mm).
If the Design Rules have been modified, the name in the dialog's title will have
trailing asterisk ('*') to mark the Design Rules as modified. This mark
will be removed once the Design Rules are explicitly written to disk, or a new set
of Design Rules is loaded.
The layer setup is defined by the string in the "Setup" field. This string consists of
a sequence of layer numbers, separated by one of the characters '*' or
'+', where '*' stands for core material (also known as FR4
or something similar) and '+' stands for prepreg (or any other kind of
isolation material). The actual core and prepreg sequence has no meaning
to EAGLE other than varying the color in the layer display at the top left corner
of this tab (the actual multilayer setup always needs to be worked out with the
board manufacturer). The vias are defined by enclosing a sequence of layers with (...).
So the setup string
Note that a polygon in the special signal named _OUTLINES_ will be used to generate
outlines data and as such will not adhere to these
clearance values.
For compatibility with version 3.5x the following applies:
If the minimum distance between copper and dimension is set to 0
objects in the Dimension layer will not be taken into account when calculating
polygons (except for Holes, which are always taken into account). This also disables
the distance check between copper and dimension objects.
Cross-reference labels are typically placed at the right or left border of
a schematic sheet, and indicate the next (or previous) sheet a particular net
is used on. See the LABEL command for a detailed
description of how this works.
When actually displayed, the '>XREF' text variable will be replaced
with the sheet number, frame column and row (according to the
part cross-reference format) of the Must
gate of this device.
See Contact cross-references on how
to display the contact locations on the coil's sheet.
The contact symbols need to contain the '>XREF' text variable
in order to generate part cross-references.
The gate symbols shall be drawn in a way that the pins extend up and down,
and that the origin is at the center of the symbol.
The first contact gate in the device set drawing shall be placed at an x-coordinate
of 0, and its y-coordinate shall be high enough to make sure its lower pin is in the
positive area, typically at 100mil. The rest of the contact gates shall be placed
to the right of the first one, with their origins at the same y-coordinate as the
first one. The coil gate can be placed at an arbitrary location.
In the schematic drawing the contact cross-reference will be shown at the same
x-coordinate as the coil instance, and right below the y-coordinate defined
by the text variable '>CONTACT_XREF'. This text variable can be
defined either in a drawing frame symbol or directly on the sheet. If it is
present in both, the one in the sheet is taken. The actual text will not be visible
in the schematic sheet.
The graphical representation of the contact cross-reference consists of all the
gates that have an '>XREF' text variable (except for the first Must
gate, which is the coil and typically doesn't have this variable). The gates are
rotated by 90 degrees and are shown from top to bottom at the same offsets
as they have been drawn from left to right in the device set. Their sheet numbers and
frame locations are displayed to the right of each gate that is actually used.
Any other texts that have been defined in the symbol drawings will not be
displayed when using these symbols for generating the contact cross-reference.
Note that the contact cross-reference can't be selected with the mouse. If you
want to move it, move the coil instance and the contact cross-reference will
automatically follow it.
The contact cross-reference may get out of sync in case contact gates are
invoked, moved, deleted or swapped, or if the '>CONTACT_XREF' text
variable is modified. This will automatically be updated at the next window refresh.
To use this feature you have to
write a User Language Program (ULP),
and then execute it.
The following sections describe the EAGLE User Language in detail:
A User Language Program consists of two major items,
definitions and
statements.
Definitions are used to define constants,
variables and functions to be used by statements.
A simple ULP could look like this:
If the result of the ULP shall be a specific command that shall be executed in the
editor window, the exit() function can be
used to send that command to the editor window.
A ULP can return information on whether it has run successfully or not.
You can use the exit() function to terminate
the program and set the return value.
A return value of 0 means the ULP has ended "normally" (i.e.
successfully), while any other value is considered as an abnormal
program termination.
The default return value of any ULP is 0.
When the RUN command is executed as part of a
script file, the script is terminated if
the ULP has exited with a return value other than 0.
A special variant of the exit() function can be
used to send a command to the editor window as a result of the ULP.
Any spaces (blanks), tabs, newline characters and
comments are considered whitespace
and are discarded.
The only place where ASCII characters representing whitespace
are not discarded is within literal strings,
like in
If the final newline character of a line is preceded by a backslash
(\), the backslash and newline character are both discarded,
and the two lines are treated as one line:
There are two ways to define a comment. The first one uses the syntax
The second way to define a comment uses the syntax
The maximum include depth is 10.
Each #include directive is processed only once. This makes sure
that there are no multiple definitions of the same variables or functions, which
would cause errors.
If the #usage directive is present,
its text (which has to be a string constant)
will be used in the Control Panel to display a description
of the program.
In case the ULP needs to use this information in, for example, a
dlgMessageBox(), the text is available
to the program through the builtin constant
usage.
Only the #usage directive of the main program file (that is the one
started with the RUN command) will take effect.
Therefore pure include files can (and should!)
also have #usage directives of their own.
It is best to have the #usage directive at the beginning of the file,
so that the Control Panel doesn't have to parse all the rest of the text when
looking for the information to display.
If the usage information shall be made available in several langauges, the
texts of the individual languages have to be separated by commas.
Each of these texts has to start with the two letter code of the respective
language (as delivered by the language() function),
followed by a colon and any number of blanks. If no suitable text is found for
the language used on the actual system, the first given text will be used (this
one should generally be English in order to make the program accessible to the
largest number of users).
Identifiers consist of a sequence of letters (a b c..., A B C...),
digits (1 2 3...) and underscores (_). The first character
of an identifier must be a letter or an underscore.
Identifiers are case-sensitive, which means that
The maximum length of an identifier is 100 characters, and all of these
are significant.
The type of an integer constant is
int.
The type of an real constant is
real.
String constants can be of any length (provided there is enough free memory
available).
String constants can be concatenated by simply writing them next to each other
to form larger strings:
Any character following the initial backslash that is not mentioned in
this list will be treated as that character (without the backslash).
Escape sequences can be used in
character constants and
string constants.
Other special characters are used as operators
in a ULP.
The four basic data types are
Besides these basic data types there are also high level
Object Types, which
represent the data structures stored in the EAGLE data files.
The special data type void is used only as a return type of a
function, indicating that this
function does not return any value.
A variable of type char has a size of 8 bit (one byte), and can
store any value in the range 0..255.
See also Operators,
Character Constants
A variable of type int has a size of 32 bit (four byte), and can
store any value in the range -2147483648..2147483647.
See also Integer Constants
A variable of type real has a size of 64 bit (eight byte), and can
store any value in the range ±2.2e-308..±1.7e+308 with a
precision of 15 digits.
See also Real Constants
A variable of type string is not limited in it's size (provided
there is enough memory available).
Variables of type string are defined without an explicit
size. They grow automatically as necessary during program
execution.
The elements of a string variable are of type
int and
can be accessed individually by using [index].
The first character of a string has the index 0:
A lossless conversion to char is possible
for standard ASCII strings:
See also Operators,
Builtin Functions,
String Constants
Arithmetic types are
char,
int and
real
(in that order). So if, e.g. a is of type
int
and b is of type
real,
the result of the expression a + b would be
real.
See also Typecast
The general syntax of a typecast is
When typecasting a real expression to
int, the fractional part of the value
is truncated!
See also Type Conversions
The properties of these objects can be accessed through members.
There are two kinds of members:
Loop members are used to access multiple objects of the same
kind, which are contained in a higher level object:
Loop members process objects in alpha-numerical order, provided they
have a name.
A loop member function creates a variable of the type necessary to hold
the requested objects. You are free to use any valid name for such a
variable, so the above example might also be written as
A UL_AREA is an abstract object which gives information about the area
covered by an object. For a UL_PACKAGE or UL_SYMBOL in a UL_ELEMENT or
UL_INSTANCE context, respectively, the area is given in absolute drawing
coordinates, including the offset of the element or instance and including
the area of moved texts after SMASH.
A UL_ATTRIBUTE can be used to access the attributes that have been
defined in the library for a device, or assigned to a part in the schematic
or board.
In a UL_ELEMENT context constant only returns an actual value if
f/b annotation is active, otherwise it returns 0.
The defaultvalue member returns the value as defined in the library
(if different from the actual value, otherwise the same as value).
In a UL_ELEMENT context defaultvalue only returns an actual value if
f/b annotation is active, otherwise an empty string is returned.
The text member is only available in a UL_INSTANCE or UL_ELEMENT
context and returns a UL_TEXT object that contains all the text parameters.
The value of this text object is the string as it will be displayed according to
the UL_ATTRIBUTE's 'display' parameter. If called from a different context,
the data of the returned UL_TEXT object is undefined.
For global attributes only name and value are defined.
The name member returns the full file name, including the directory.
The attributes() loop member loops through the global attributes.
If the name member returns an empty string, the net class is not defined
and therefore not in use by any signal or net.
The coordinates (x, y) of the contact depend on the context in which it is called:
All members of UL_DEVICE, except for name and technologies, return the
same values as the respective members of the UL_DEVICESET in which the UL_DEVICE has been
defined.
The name member returns the name of the package variant this device
has been created for using the PACKAGE command.
When using the description text keep in mind that it may contain newline characters ('\n').
The package data member returns the package
that has been assigned to the device through a PACKAGE
command. It can be used as a boolean function to check whether a package has been
assigned to a device (see example below).
The value returned by the technologies member depends on the context in which it is called:
The attributes() loop member takes an additional parameter that specifies
for which technology the attributes shall be delivered (see the second example below).
The description member returns the complete descriptive text as defined with
the DESCRIPTION command, while the headline
member returns only the first line of the description, without any HTML tags.
When using the description text keep in mind that it may contain newline characters ('\n').
The texts() member only loops through those texts of the element that have been
detached using SMASH,
and through the visible texts of any attributes assigned to this element.
To process all texts of an element (e.g. when drawing it), you have to loop through the element's
own texts() member as well as the texts() member of the
element's package.
angle defines how many degrees the element is rotated counterclockwise
around its origin.
The column and row members return the column and row location within
the frame in the board drawing.
If there is no frame in the drawing, or the element is placed outside the frame, a '?'
(question mark) is returned.
The smashed member tells whether the element is smashed. This function can also
be used to find out whether there is a detached text parameter by giving the name of
that parameter in square brackets, as in smashed["VALUE"]. This is useful
in case you want to select such a text with the MOVE command
by doing MOVE R5>VALUE. Valid parameter names are "NAME" and "VALUE", as
well as the names of any user defined attributes.
They are treated case insensitive, and they may be preceded by a '>'
character.
The members layer and contours() are only available in UL_BOARD context
and the members area2, modulename, s1..s6 and sheet
are only available in UL_SCHEMATIC context.
The member area2 is a second area, only available on some ERC errors and refers
to the corresponding area in the board.
The members s1..s6 are string values, which contain for ERC errors
specific informations like names.
The contours() loop member loops through the contour wires of the
DRC error polygon.
The texts() and wires() loop members loop through all the
texts and wires the frame consists of.
drillsymbol returns the number of the drill symbol that has been assigned
to this drill diameter (see the manual for a list of defined drill symbols).
A value of 0 means that no symbol has been assigned to this drill diameter.
The texts() member only loops through those texts of the instance that have been
detached using SMASH,
and through the visible texts of any attributes assigned to this instance.
To process all texts of an instance, you have to loop through the instance's
own texts() member as well as the texts() member of the
instance's gate's symbol.
If attributes have been assigned to an instance, texts() delivers their texts
in the form as they are currently visible.
The column and row members return the column and row location within
the frame on the sheet on which this instance is invoked.
If there is no frame on that sheet, or the instance is placed outside the frame, a '?'
(question mark) is returned.
These members can only be used in a sheet context.
The smashed member tells whether the instance is smashed. This function can also
be used to find out whether there is a detached text parameter by giving the name of
that parameter in square brackets, as in smashed["VALUE"]. This is useful
in case you want to select such a text with the MOVE command
by doing MOVE R5>VALUE. Valid parameter names are "NAME", "VALUE",
"PART" and "GATE", as well as the names of any user defined attributes.
They are treated case insensitive, and they may be preceded by a '>'
character.
The xrefs() member loops through the contact cross-reference
gates of this instance. These are only of importance if the ULP is going to create
a drawing of some sort (for instance a DXF file).
The angle, layer, mirror and spin members always
return the same values as those of the UL_TEXT object returned by the text
member. The x and y members of the text return slightly offset values for
cross-reference labels (non-zero xref), otherwise they also return the same values
as the UL_LABEL.
xref is only meaningful for net labels. For bus labels it always returns 0.
The devices() member loops through all the package variants and technologies
of all UL_DEVICESETs in the library, thus resulting in all the actual device variations
available. The devicesets() member only loops through the UL_DEVICESETs,
which in turn can be queried for their UL_DEVICE members.
If the library is derived form a UL_BOARD or UL_SCHEMATIC context, name returns
the pure library name (without path or extension). Otherwise it returns the full library file name.
The column and row members return the column and row location within
the frame on the sheet on which this instance is invoked.
If there is no frame on that sheet, or the instance is placed outside the frame, a '?'
(question mark) is returned.
These members can only be used in a sheet context.
The smashed member tells whether the instance is smashed. This function can also
be used to find out whether there is a detached text parameter by giving the name of
that parameter in square brackets, as in smashed["NAME"]. This is useful
in case you want to select such a text with the MOVE command
by doing MOVE MOD1>NAME.
The column and row members return the column and row locations within
the frame on the sheet on which this net is drawn. Since a net
can extend over a certain area, each of these functions returns two values, separated by
a blank. In case of column these are the left- and rightmost columns touched
by the net, and in case of row it's the top- and bottommost row.
When determining the column and row of a net on a sheet, first the column and then
the row within that column is taken into account. Here XREF labels take precedence
over normal labels, which again take precedence over net wires.
If there is no frame on that sheet, "? ?" (two question marks) is returned.
If any part of the net is placed outside the frame, either of the values may be '?' (question mark).
These members can only be used in a sheet context.
If the net is retrieved with UL_SCHEMATIC.allnets() the valid members are:
name, class and pinrefs().
The pinrefs() loop member loops also through the virtual pinrefs generated by
module instances.
If the UL_PACKAGE is derived from a UL_ELEMENT, the texts() member only loops through the
non-detached texts of that element.
If the UL_PACKAGE is derived from a UL_ELEMENT, polygons and wires belonging to contacts with arbitrary
pad shapes are available through the loop members polygons() and wires() of this contact.
The diameter and shape of the pad depend on the layer for which they shall be retrieved,
because they may be different in each layer depending on the Design Rules.
If one of the layers LAYER_TOP...LAYER_BOTTOM, LAYER_TSTOP or LAYER_BSTOP
is given as the index to the diameter or shape data member, the resulting value will be calculated
according to the Design Rules. If LAYER_PADS is given, the raw value as defined in the library will
be returned.
drillsymbol returns the number of the drill symbol that has been assigned
to this drill diameter (see the manual for a list of defined drill symbols).
A value of 0 means that no symbol has been assigned to this drill diameter.
angle defines how many degrees the pad is rotated counterclockwise
around its center.
elongation is only valid for shapes PAD_SHAPE_LONG and PAD_SHAPE_OFFSET and
defines how many percent the long side of such a pad is longer than its small side.
This member returns 0 for any other pad shapes.
The value returned by flags must be masked with the PAD_FLAG_...
constants to determine the individual flag settings, as in
When looping through the attributes() of a UL_PART, only the name,
value, defaultvalue and constant members of the resulting
UL_ATTRIBUTE objects are valid.
When looping through the assembly variants() of a UL_PART, only actual variants
are available. The default assembly variant is not available here. Therefore this loop
is not active on parts without assembly variants.
If the part is in a sheet context, the instances() loop member
loops only through those instances that are actually used on that sheet.
If the part is in a schematic or module context, all instances are looped through.
If the part is a virtual part (virtual parts can be retrieved with UL_SCHEMATIC.allparts(),
see UL_SCHEMATIC) the instances() loop is empty.
If the part is from a module or is a virtual part, module refers to this.
If not (part in main schematic), module is null.
If the part is virtual, modulepart is the (real) part from the source module module.
If it's a part in main schematic or if it's a module part itself modulepart is null.
If the part is virtual, modulepath is a string with the sequence of names of the module instances
that point to the module containing the part being used. These names are separated by ':'.
In other cases this string is empty.
The contact data member returns the contact
that has been assigned to the pin through a CONNECT
command.
This member is deprecated! It will work for backwards compatibility and as long
as only one pad has been connected to the pin, but will cause a runtime error when
used with a pin that is connected to more than one pad.
The route member also only makes sense if there's a relation to contacts
the pin is connected to. Otherwise the value is set to 0.
The coordinates (and layer, in case of an SMD) of the contact returned by
the contact data member depend on the context in which it is called:
The net data member returns the name of the net to which this pin is connected to
(only available in a UL_SCHEMATIC context).
If the contours() loop member is called without a second parameter,
it loops through all of the contour wires, regardless whether they
belong to a positive or a negative polygon. If you are interested in getting
the positive and negative contour wires separately, you can call contours()
with an additional integer parameter (see the second example below). The sign of
that parameter determines whether a positive or a negative polygon will be handled,
and the value indicates the index of that polygon. If there is no polygon with the
given index, the statement will not be executed. Another advantage of this method
is that you don't need to determine the beginning and end of a particular polygon
yourself (by comparing coordinates). For any given index, the statement will be
executed for all the wires of that polygon.
With the second parameter 0 the behavior is the same
as without a second parameter.
The wires looped through by contours() always start with a positive
polygon. To find out where one partial polygon ends and the next one begins, simply
store the (x1,y1) coordinates of the first wire and check them against
(x2,y2) of every following wire. As soon as these are equal, the last wire
of a partial polygon has been found. It is also guaranteed that the second
point (x2,y2) of one wire is identical to the first point (x1,y1) of the
next wire in that partial polygon.
To find out where the "inside" and the "outside" of the polygon lays,
take any contour wire and imagine looking from its point (x1,y1) to (x2,y2).
The "inside" of the polygon is always on the right side of the wire.
Note that if you simply want to draw the polygon you won't need all these
details.
The bus and the net data members return the name of the bus or net
to which this port is connected to (only available in a UL_MODULEINST context).
Additionally the nets loop member loops through all available nets of this
connection.
The coordinates (x1 y1) and (x2 y2) are always referring to the initial orientation of the
rectangle regardless of the angle.
angle defines how many degrees the rectangle is rotated counterclockwise
around its center. The center coordinates are given by (x1+x2)/2 and (y1+y2)/2.
The name member returns the full file name, including the directory.
The xreflabel and xrefpart members return the format strings used to display
cross-reference labels and part cross-references.
The attributes() loop member loops through the global attributes.
The texts() loop member was used in older EAGLE versions to loop through
the labels of a segment, and is only present for compatibility. It will not
deliver the text of cross-reference labels at the correct position. Use the
labels() loop member to access a segment's labels.
angle defines how many degrees the smd is rotated counterclockwise
around its center.
The value returned by flags must be masked with the SMD_FLAG_...
constants to determine the individual flag settings, as in
If the UL_TEXT is derived from a UL_ELEMENT or UL_INSTANCE context, the member
values will be those of the actual text as located in the board or sheet drawing.
Note that diameter and shape will always return the diameter or
shape that a via would have in the given layer, even if that particular via doesn't
cover that layer (or if that layer isn't used in the layer setup at all).
start and end return the layer numbers in which that via starts and
ends. The value of start will always be less than that of end.
drillsymbol returns the number of the drill symbol that has been assigned
to this drill diameter (see the manual for a list of defined drill symbols).
A value of 0 means that no symbol has been assigned to this drill diameter.
The cap parameter only has a meaning for actual arcs, and will always return
CAP_ROUND for a straight wire.
Whether or not an UL_WIRE is an arc can be determined by checking the boolean return
value of the arc data member. If it returns 0, we have a straight
wire, otherwise an arc. If arc returns a non-zero value it may be further
dereferenced to access the UL_ARC specific parameters start
and end angle, radius and center point. Note that you may only need these additional
parameters if you are going to draw the arc or process it in other ways where the
actual shape is important.
There are three kinds of definitions:
The scope of a function definition goes from the closing
brace (}) of the function body to the end of the User Language
Program.
Constants may also be initialized to specific values, like
Multiple variable definitions of the same type are separated
by commas (,).
If identifier is followed by a pair of
brackets ([]), this defines an array
of variables of the given type. The size of an array is
automatically adjusted at runtime.
The optional keyword numeric can be used with
string arrays to have them sorted
alphanumerically by the sort() function.
By default (if no initializer is present),
data variables are set to 0
(or "", in case of a string), and
object variables are "invalid".
The general syntax of a function definition is
Functions that do not return a value have the type void.
A function must be defined before it can be called, and function
calls can not be recursive (a function cannot call itself).
The statements in the function body may modify the values of the parameters,
but this will not have any effect on the arguments of the
function call.
Execution of a function can be terminated by the
return statement. Without any
return statement the function body is executed until it's closing
brace (}).
A call to the exit() function will
terminate the entire User Language Program.
Command line arguments are available to the program through the global
Builtin Variables argc and argv.
Associativity is left to right for all operators, except for
Unary, Conditional and Assignment,
which are right to left associative.
The normal operator precedence can be altered by the use of
parentheses.
Using a string expression with a
logical operator checks whether the string is empty.
Using an Object Type with a logical
operator checks whether that object contains valid data.
The Conditional operator is used to make a decision within
an expression, as in
The Comma operator is used to evaluate a sequence of expressions
from left to right, using the type and value of the right operand as
the result.
Note that arguments in a function call as well as multiple variable declarations
also use commas as delimiters, but in that case this is not a
comma operator!
See also String Operators
The + operator concatenates two strings, or adds a character
to the end of a string and returns the resulting string.
The += operator appends a string or a character to the end of
a given string.
See also Arithmetic Operators
Comma expressions are evaluated left to right, and the result of a comma
expression is the type and value of the rightmost expression.
Compound statements can be nested to any depth.
An expression statement is executed by evaluating the expression.
All side effects of this evaluation are completed before the next
statement is executed.
Most expression statements are
assignments or
function calls.
A special case is the empty statement, consisting of only a
semicolon.
An empty statement does nothing, but it may be useful in situations
where the ULP syntax expects a statement but your program does not
need one.
Iteration statements are
Since all of these statements can be intermixed and nested to any
depth, take care to ensure that your break exits from the
correct statement.
Since all of these statements can be intermixed and nested to any
depth, take care to ensure that your continue affects the
correct statement.
The condition is tested after the first
execution of statement, which means that the statement is
always executed at least one time.
If there is no
break or
return
inside the statement, the statement must affect
the value of the condition, or condition itself must
change during evaluation in order to avoid an endless loop.
The initializing expression init normally initializes one or more
loop counters. It may also define a new variable as a loop counter.
The scope of such a variable is valid until the end of the block
which encloses the for loop.
An else clause is always matched to the last encountered if
without an else. If this is not what you want, you need to use
braces to group the statements, as in
If the function is of type void, a return statement
without an expression can be used to return from the function
call.
Any case_statement can be labeled by one or more case
labels. The case_exp of each case label must evaluate
to a constant integer which is unique within it's enclosing switch
statement.
There can also be at most one default label.
After evaluating sw_exp, the case_exp are checked for
a match. If a match is found, control passes to the case_statement
with the matching case label.
If no match is found and there is a default label, control
passes to def_statement. Otherwise none of the statements in the
switch is executed.
Program execution is not affected when case and default
labels are encountered. Control simply passes through the labels to the
following statement.
To stop execution at the end of a group of statements for a particular
case, use the break statement.
The condition is tested before the first possible
execution of statement, which means that the statement may never
be executed if condition is initially zero.
If there is no
break or
return
inside the statement, the statement must affect
the value of the condition, or condition itself must
change during evaluation in order to avoid an endless loop.
Many of the object types have their
own Constants section which lists the builtin constants for that
particular object (see e.g. UL_PIN).
The following builtin constants are defined in addition to the ones
listed for the various object types:
These builtin constants contain the directory paths defined in the
directories dialog, with any of the special
variables ($HOME and $EAGLEDIR) replaced by their actual values.
Since each path can consist of several directories, these constants are string
arrays with an individual directory in each member. The first empty member marks the end of the path:
When using these constants to build a full file name, you need to use a directory separator,
as in
The libraries that are currently in use through the USE command:
You may also write your own functions
and use them to structure your User Language Program.
The builtin functions are grouped into the following categories:
The following character functions are available:
The following file handling functions are available:
fileerror checks the status of any I/O operations that have been performed
since the last call to this function and returns 0 if everything was ok.
If any of the I/O operations has caused an error, a value other than 0
will be returned.
You should call fileerror before any I/O operations to reset any previous
error state, and call it again after the I/O operations to see if they were successful.
When fileerror returns a value other than 0 (thus indicating an error)
a proper error message has already been given to the user.
fileglob performs a directory search using pattern.
pattern may contain '*' and '?' as wildcard characters.
If pattern ends with a '/', the contents of the given directory will be returned.
Names in the resulting array that end with a '/' are directory names.
The array is sorted alphabetically, with the directories coming first.
The special entries '.' and '..' (for the current and parent directories)
are never returned in the array.
If pattern doesn't match, or if you don't have permission to search the given
directory, the resulting array will be empty.
Sorting filenames under Windows is done case insensitively.
The following file input is available:
If dest is a character array, the file will be read as raw binary data
and the return value reflects the number of bytes read into the character array
(which is equal to the file size).
If dest is a string array, the file will be read as a text file (one line
per array member) and the return value will be the number of lines read into the
string array. Newline characters will be stripped.
If dest is a string, the entire file will be read into that string
and the return value will be the length of that string (which is not necessarily
equal to the file size, if the operating system stores text files with "cr/lf"
instead of a "newline" character).
The following mathematical functions are available:
The return type of these functions is the same as the (larger) type
of the arguments. type must be one of
char,
int or
real.
The following miscellaneous functions are available:
The cfgset function sets the parameter with the given name to
the given value.
The valid characters for name are
'A'-'Z',
'a'-'z',
'0'-'9',
'.' and
'_'.
The parameters are stored in the user's eaglerc file.
To ensure that different User Language Programs don't overwrite each other's
parameters in case they use the same parameter names, it is recommended to put
the name of the ULP at the beginning of the parameter name. For example, a ULP
named mytool.ulp that uses a parameter named MyParam could store
that parameter under the name
In the eaglerc file the User Language parameters are stored with the prefix
"ULP:". Therefore this prefix may be optionally put in front of User Language
parameter names, as in
The exit function terminates execution of a User Language Program.
The language function can be used to make a ULP use different
message string, depending on which language the current system is using.
In the example below all the strings used in the ULP are listed in the
string array I18N[], preceeded by a string containing the
various language codes supported by this ULP. Note the vtab
characters used to separate the individual parts of each string (they
are important for the lookup function) and the use of the commas
to separate the strings. The actual work is done in the function tr(),
which returns the translated version of the given string.
If the original string can't be found in the I18N array, or there
is no translation for the current language, the original string will be used
untranslated.
The first language defined in the I18N array must be the one in which
the strings used throughout the ULP are written, and should generally be
English in order to make the program accessible to the largest number of users.
An array that can be used with lookup() consists of strings of text,
each string representing one data record.
Each data record contains an arbitrary number of fields, which are separated by
the character separator (default is '\t', the tabulator).
The first field in a record is used as the key and is numbered 0.
All records must have unique key fields and none of the key fields
may be empty - otherwise it is undefined which record will be found.
If the first string in the array contains a "Header" record (i.e. a record where
each field describes its contents), using lookup with a field_name
string automatically determines the index of that field. This allows using the
lookup function without exactly knowing which field index contains
the desired data.
If the key parameter in the call to lookup() is an empty
string, the first string of the array will be used. This allows a program to
determine whether there is a header record with the required field names.
If a field contains the separator character, that field must be enclosed
in double quotes (as in "abc;def", assuming the semicolon (';')
is used as separator). The same applies if the field contains double quotes
("), in which case the double quotes inside the field have to be doubled
(as in "abc;""def"";ghi", which would be abc;"def";ghi).
Here's an example data file (';' has been used as separator for better readability):
The special value -1 for index makes the function return the type
of the palette that is currently in use by the editor window.
If either index or type is out of range, an error message will be
given and the ULP will be terminated.
The sleep function delays the execution of an ULP program for number
of seconds.
In any case, the number argument defines the number of items in the
array(s).
Note the use of the keyword numeric in the string arrays. This causes
the strings to be sorted in a way that takes into account a numeric part
at the end of the strings, which leads to IC1, IC2,... IC9, IC10 instead of
the alphabetical order IC1, IC10, IC2,...IC9.
When sorting a set of arrays, the first (index) array must be of type
int and need not be initialized. Any
contents the index array might have before calling the sort
function will be overwritten by the resulting index values.
The status function displays the given message in the status bar of the
editor window in which the ULP is running.
If you want to have control over what system commands are actually executed,
you can write a wrapper function that prompts the user for confirmation before
executing the command, like
EAGLE stores all coordinate and size values as int
values with a resolution of 1/320000mm (0.003125µ). The above unit conversion
functions can be used to convert these internal units to the desired
measurement units, and vice versa.
The following network functions are available:
The neterror function should be called after any of the other
network functions has returned a negative value, indicating that an
error has occurred. The return value of neterror is a textual
string that can be presented to the user.
For errors related to SSL connections (HTTPS) also consider the note in
netget.
The netget function sends the given url to the network and
stores the result in the dest variable.
If dest is a string array, the result will be treated as text data (one line
per array member) and the return value will be the number of lines stored in the
string array. Newline characters will be stripped.
If dest is a string, the result will be stored in that string
and the return value will be the length of the string. Note that in case
of binary data the result is truncated at the first occurrence of a byte with
the value 0x00.
If you need to use a proxy to access the Internet with HTTP or HTTPS, you can set
that up in the "Configure" dialog under "Help/Check for Update" in the Control Panel.
The netpost function sends the given data to the given url
on the network and stores the result in the dest variable.
If a user id and password is required to access a remote site, these can be
given as
If dest is a string array, the result will be treated as text data (one line
per array member) and the return value will be the number of lines stored in the
string array. Newline characters will be stripped.
If dest is a string, the result will be stored in that string
and the return value will be the length of the string. Note that in case
of binary data the result is truncated at the first occurrence of a byte with
the value 0x00.
If you need to use a proxy to access the Internet with HTTP or HTTPS, you can set
that up in the "Configure" dialog under "Help/Check for Update" in the Control Panel.
If you should face problems related to SSL connections (HTTPS) consider the note in
netget.
The following printing functions are available:
In case of an error, printf returns -1.
The format string contains two types of objects - plain characters
and format specifiers:
% [flags] [width] [.prec] type
Each format specification begins with the percent character (%).
After the % comes the following, in this order:
Width is specified either directly, through a decimal digit string, or
indirectly, through an asterisk (*). If you use an asterisk for the
width specifier, the preceding argument (which must be an int) to the one being
formatted (with this format specifier) determines the minimum output field width.
In no case does a nonexistent or small field width cause truncation of
a field. If the result of a conversion is wider than the field width,
the field is simply expanded to contain the conversion result.
In case of an error, sprintf returns -1.
The following string functions are available:
If index is given, the search starts at that position.
Negative values are counted from the end of the string.
strjoin joins all entries in array, delimited by the given
separator and returns the resulting string.
If separator is the newline character ('\n') the resulting
string will be terminated with a newline character.
This is done to have a text file that
consists of N lines (each of which is terminated with a newline) and is read
in with the fileread() function and
split into
an array of N strings to be joined to the original string as read from the file.
If index is given, the search starts at that position.
Negative values are counted from the end of the string.
If index is given, the search starts at that position.
Negative values are counted from the end of the string.
strsplit splits the string s at the given separator
and stores the resulting fields in the array.
If separator is the newline character ('\n') the last field
will be silently dropped if it is empty. This is done to have a text file that
consists of N lines (each of which is terminated with a newline) and is read
in with the fileread() function to be split into
an array of N strings. With any other separator an empty field at the
end of the string will count, so "a:b:c:" will result in 4 fields,
the last of which is empty.
If index is given, the search starts at that position.
Negative values are counted from the end of the string.
The value for length must be positive, otherwise an empty string
will be returned. If length is ommitted, the rest of the string
(beginning at start) is returned.
If start points to a position outside the string, an empty string
is returned.
If index is given, the search starts at that position.
Negative values are counted from the end of the string.
If length is given, the actual length of the matching substring
is returned in that variable.
Regular expressions allow you to find a pattern within a text string.
For instance, the regular expression "i.*a" would find a sequence of characters
that starts with an 'i', followed by any character ('.') any number of times ('*'),
and ends with an 'a'. It would match on "is a" as well as "is this a" or "ia".
The following time functions are available:
After 86400000 milliseconds (i.e. every 24 hours), the value starts at 0 again.
The t2string function without the optional format parameter
converts the given time t into a country specific string in local time.
If t2string is called with a format string, that format is
used to determine what the result should look like.
The following expressions can be used in a format string:
All other characters will be copied "as is".
Any sequence of characters that are enclosed in singlequotes will be treated as
text and not be used as an expression. Two consecutive single quotes ('') are
replaced by a single quote in the output.
The following object functions are available:
The clrgroup() function clears the group flags of the given object,
so that it is no longer part of the previously defined group.
When applied to an object that contains other objects (like a UL_BOARD or
UL_NET) the group flags of all contained objects are cleared recursively,
but with analogous limitations like for setgroup().
If a group has been defined in the editor, the ingroup() function can
be used to check whether a particular object is part of the group.
Objects with a single coordinate that are individually selectable in the current
drawing (like UL_TEXT, UL_VIA, UL_CIRCLE etc.) return a non-zero value
in a call to ingroup() if that coordinate is within the defined group.
A UL_WIRE returns 0, 1, 2 or 3, depending on whether none, the first, the second
or both of its end points are in the group.
A UL_RECTANGLE and UL_FRAME returns a non-zero value if one or more of its corners are in the group.
The value has bit 0 set for the upper right corner, bit 1 for the upper left, bit 2
for the bottom left, and bit 3 for the bottom right corner.
Higher ranking objects that have no coordinates (UL_NET, UL_SEGMENT, UL_SIGNAL, UL_POLYGON)
or that are actually not available as drawing objects (UL_SHEET, UL_DEVICESET, UL_SYMBOL, UL_PACKAGE),
return a non-zero value if one or more of the objects within them are in the group.
For details on the object hierarchies see Object Types.
The setgroup() function sets the group flags of the given object,
so that it becomes part of the group.
If no flags are given, the object is added to the group as a whole
(i.e. all of its selection points, in case it has more than one).
If flags has a non-zero value, only the group flags of the given
points of the object are set. For a UL_WIRE this means that '1'
sets the group flag of the first point, '2' that of the second point,
and '3' sets both. Any previously set group flags remain unchanged
by a call to setgroup().
When applied to an object that contains other objects (like a UL_BOARD or
UL_NET) the group flags of all contained objects are set recursively with following limitations:
The setvariant() function sets the current assembly variant to the one
given by name. This can be used to loop through all of the parts and
"see" their data exactly as defined in the given variant.
name must reference a valid assembly variant that is contained in the
current drawing.
This function returns a non-zero value if the given assembly variant exists,
zero otherwise.
The assembly variant that has been set by a call to setvariant() is
only active until the User Language Program returns. After that, the variant
in the drawing will be the same as before the start of the ULP.
Setting the assembly variant in a board is only possible if the consistent
schematic is loaded.
The variant() function returns the name of the current assembly variant.
If no variant is currently selected, the empty string ('') is returned.
The following XML functions are available:
The xmlattribute function returns the value of the given attribute
from the given tag within the given xml code.
If an attribute appears more than once in the same tag, the value of its last
occurrence is taken.
The xmlattributes function stores the names of all attributes
from the given tag within the given xml code in the array
and returns the number of attributes found.
The order is not necessarily the same like in the given xml code.
If an attribute appears more than once in the same tag, its name appears only
once in the array.
The tag is given in the form of a path.
If the given xml code contains an error, the result of any XML function
is empty, and a warning dialog is presented to the user, giving information
about where in the ULP and XML code the error occurred. Note that the line and
column number within the XML code refers to the actual string given to this
function as the xml parameter.
The xmlelement function returns the complete XML element of the given
tag within the given xml code.
The result still contains the element's outer XML tag, and can thus be used
for further processing with the other XML functions.
Any whitespace within plain text parts of the element is retained.
The overall formatting of the XML tags within the element and the order of element
attributes may be different than the original xml code, though.
The xmlelements function works just like xmlelement, but returns
all occurrences of elements with the given tag. The return value is the
number of elements stored in the array.
The tag is given in the form of a path.
If the given xml code contains an error, the result of any XML function
is empty, and a warning dialog is presented to the user, giving information
about where in the ULP and XML code the error occurred. Note that the line and
column number within the XML code refers to the actual string given to this
function as the xml parameter.
The xmltags function returns the names of all the tags on the top level
of the given tag within the given xml code.
The return value is the number of tag names stored in the array.
Each tag name is returned only once, even if it appears several times in the XML code.
The tag is given in the form of a path.
If the given xml code contains an error, the result of any XML function
is empty, and a warning dialog is presented to the user, giving information
about where in the ULP and XML code the error occurred. Note that the line and
column number within the XML code refers to the actual string given to this
function as the xml parameter.
The xmltext function returns the textual data from
the given tag within the given xml code.
Any tags within the text are stripped, whitespace (including
newline characters) is retained.
The tag is given in the form of a path.
If the given xml code contains an error, the result of any XML function
is empty, and a warning dialog is presented to the user, giving information
about where in the ULP and XML code the error occurred. Note that the line and
column number within the XML code refers to the actual string given to this
function as the xml parameter.
The general syntax of a builtin statement is
Note that statement can be a compound statement, as in
The board statement opens a board context if the current editor
window contains a board drawing. A variable of type
UL_BOARD is created and is given
the name indicated by identifier.
Once the board context is successfully opened and a board variable has been
created, the statement is executed. Within the scope of the
statement the board variable can be accessed to retrieve further
data from the board.
If the current editor window does not contain a board drawing, an error
message is given and the ULP is terminated.
The deviceset statement opens a device set context if the current editor
window contains a device drawing. A variable of type
UL_DEVICESET is created and is given
the name indicated by identifier.
Once the device set context is successfully opened and a device set variable has been
created, the statement is executed. Within the scope of the
statement the device set variable can be accessed to retrieve further
data from the device set.
If the current editor window does not contain a device drawing, an error
message is given and the ULP is terminated.
The library statement opens a library context if the current editor
window contains a library drawing. A variable of type
UL_LIBRARY is created and is given
the name indicated by identifier.
Once the library context is successfully opened and a library variable has been
created, the statement is executed. Within the scope of the
statement the library variable can be accessed to retrieve further
data from the library.
If the current editor window does not contain a library drawing, an error
message is given and the ULP is terminated.
#The module statement opens a module context if the current editor#
#window contains a module drawing. A variable of type#
The module statement opens a module context if in the editor
window currently a module drawing is edited. A variable of type
UL_MODULE is created and is given
the name indicated by identifier.
Once the module context is successfully opened and a module variable has been
created, the statement is executed. Within the scope of the
statement the module variable can be accessed to retrieve further
data from the module.
#If the current editor window does not contain a module drawing, an error#
#message is given and the ULP is terminated.#
If in the editor window currently no module drawing is edited, an error
message is given and the ULP is terminated.
The output statement opens a file with the given filename
and mode for output through subsequent printf() calls.
If the file has been successfully opened, the statement is
executed, and after that the file is closed.
If the file cannot be opened, an error message is given and execution
of the ULP is terminated.
By default the output file is written into the Project directory.
Mode characters may appear in any order and combination. However, only the
last one of a and w or t and b, respectively,
is significant. For example a mode of "abtw" would open a file for
textual write, which would be the same as "wt".
The package statement opens a package context if the current editor
window contains a package drawing. A variable of type
UL_PACKAGE is created and is given
the name indicated by identifier.
Once the package context is successfully opened and a package variable has been
created, the statement is executed. Within the scope of the
statement the package variable can be accessed to retrieve further
data from the package.
If the current editor window does not contain a package drawing, an error
message is given and the ULP is terminated.
The schematic statement opens a schematic context if the current editor
window contains a schematic drawing. A variable of type
UL_SCHEMATIC is created and is given
the name indicated by identifier.
Once the schematic context is successfully opened and a schematic variable has been
created, the statement is executed. Within the scope of the
statement the schematic variable can be accessed to retrieve further
data from the schematic.
If the current editor window does not contain a schematic drawing, an error
message is given and the ULP is terminated.
The sheet statement opens a sheet context if the current editor
window contains a sheet drawing. A variable of type
UL_SHEET is created and is given
the name indicated by identifier.
Once the sheet context is successfully opened and a sheet variable has been
created, the statement is executed. Within the scope of the
statement the sheet variable can be accessed to retrieve further
data from the sheet.
If the current editor window does not contain a sheet drawing, an error
message is given and the ULP is terminated.
The symbol statement opens a symbol context if the current editor
window contains a symbol drawing. A variable of type
UL_SYMBOL is created and is given
the name indicated by identifier.
Once the symbol context is successfully opened and a symbol variable has been
created, the statement is executed. Within the scope of the
statement the symbol variable can be accessed to retrieve further
data from the symbol.
If the current editor window does not contain a symbol drawing, an error
message is given and the ULP is terminated.
The following sections describe User Language Dialogs in detail:
The following predefined dialogs are available:
The dlgDirectory function displays a directory dialog from which the user can
select a directory.
Title will be used as the dialog's title.
If Start is not empty, it will be used as the starting point for the dlgDirectory.
The dlgFileOpen and dlgFileSave functions display a file dialog from which the user can
select a file.
Title will be used as the dialog's title.
If Start is not empty, it will be used as the starting point for the file dialog.
Otherwise the current directory will be used.
Only files matching Filter will be displayed. If Filter is empty, all files will
be displayed.
Filter can be either a simple wildcard (as in "*.brd"), a list of
wildcards (as in "*.bmp *.jpg") or may even contain descriptive text, as in
"Bitmap files (*.bmp)". If the "File type" combo box of the file dialog shall
contain several entries, they have to be separated by double semicolons, as in
"Bitmap files (*.bmp);;Other images (*.jpg *.png)".
The dlgMessageBox function displays the given Message in a modal dialog and
waits until the user selects one of the buttons defined in button_list.
If Message contains any HTML tags, the characters '<', '>' and '&'
must be given as "<", ">" and "&", respectively, if they shall
be displayed as such.
button_list is an optional list of comma separated strings, which defines the
set of buttons that will be displayed at the bottom of the message box.
The first button in button_list will become the default button (which will be selected
if the user hits ENTER), and the last button in the list will become the "cancel button", which
is selected if the user hits ESCape or closes the message box. You can make a different
button the default button by starting its name with a '+', and you can make
a different button the cancel button by starting its name with a '-'.
To start a button text with an actual '+' or '-' it has to be escaped.
If a button text contains an '&', the character following the ampersand
will become a hotkey, and when the user hits the corresponding key, that button will be selected.
To have an actual '&' character in the text it has to be escaped.
The message box can be given an icon by setting the first character of Message to
The dlgCell statement defines the location of a cell within a
grid layout context.
The row and column indexes start at 0, so the upper left cell has the index (0, 0).
With two parameters the dialog object defined by statement will be placed in
the single cell addresses by row and column.
With four parameters the dialog object will span over all cells from row/column
to row2/column2.
By default a dlgCell contains a dlgHBoxLayout,
so if the cell contains more than one dialog object, they will be placed next to
each other horizontally.
The dlgCheckBox statement defines a check box with the given Text.
If Text contains an '&', the character following the ampersand
will become a hotkey, and when the user hits Alt+hotkey, the checkbox will be toggled.
To have an actual '&' character in the text it has to be escaped.
dlgCheckBox is mainly used within a dlgGroup,
but can also be used otherwise.
If the user checks a dlgCheckBox, the associated Checked variable is set
to 1, otherwise it is set to 0.
The initial value of Checked defines whether a checkbox is initially checked.
If Checked is not equal to 0, the checkbox is initially checked.
The optional statement is executed every time the dlgCheckBox is toggled.
The dlgComboBox statement defines a combo box selection field with the contents
of the given array.
Selected reflects the index of the selected combo box entry. The first entry has index 0.
Each element of array defines the contents of one entry in the combo box.
None of the strings in array may be empty (if there is an empty string,
all strings after and including that one will be dropped).
The optional statement is executed whenever the selection in the dlgComboBox changes.
If the initial value of Selected is outside the range of the array
indexes, it is set to 0.
The dlgDialog function executes the dialog defined by
block.
This is the only dialog object that actually is a User Language builtin
function. Therefore it can be used anywhere where a function call is allowed.
The block normally contains only other dialog objects,
but it is also possible to use other User Language statements, for example to conditionally add
objects to the dialog (see the second example below).
By default a dlgDialog contains a dlgVBoxLayout,
so a simple dialog doesn't have to worry about the layout.
A dlgDialog should at some point contain a call to the dlgAccept()
function in order to allow the user to close the dialog and accept its contents.
If all you need is a simple message box or file dialog you might want to use one of the
Predefined Dialogs instead.
The dlgGridLayout statement opens a grid layout context.
The only dialog object that can be used directly in statement is
dlgCell, which defines the location of a particular
dialog object within the grid layout.
The row and column indexes start at 0, so the upper left cell has the index (0, 0).
The dlgGroup statement defines a group with the given Title.
By default a dlgGroup contains a dlgVBoxLayout,
so a simple group doesn't have to worry about the layout.
dlgGroup is mainly used to contain a set of radio buttons
or check boxes, but may as well contain any other objects in its
statement.
The dlgHBoxLayout statement opens a horizontal box layout context for the given
statement.
The dlgIntEdit statement defines an integer entry field with the given Value.
If Value is initially outside the range defined by Min and Max
it will be limited to these values.
The dlgLabel statement defines a label with the given Text.
Text can be either a string literal, as in "Hello", or a string variable.
If Text contains any HTML tags, the characters '<', '>' and '&'
must be given as "<", ">" and "&", respectively, if they shall
be displayed as such.
External hyperlinks in the Text will be opened with the appropriate
application program.
If the Update parameter is not 0 and Text is a string variable,
its contents can be modified in the statement of, e.g., a dlgPushButton,
and the label will be automatically updated. This, of course, is only
useful if Text is a dedicated string variable (not, e.g., the loop variable of
a for statement).
If Text contains an '&', and the object following the label
can have the keyboard focus, the character following the ampersand
will become a hotkey, and when the user hits Alt+hotkey, the focus will go to the
object that was defined immediately following the dlgLabel.
To have an actual '&' character in the text it has to be escaped.
The dlgListBox statement defines a list box selection field with the contents
of the given array.
Selected reflects the index of the selected list box entry. The first entry has index 0.
Each element of array defines the contents of one line in the list box.
None of the strings in array may be empty (if there is an empty string,
all strings after and including that one will be dropped).
The optional statement is executed whenever the user double clicks on an entry
of the dlgListBox (see dlgSelectionChanged
for information on how to have the statement called when only the selection in the list
changes).
If the initial value of Selected is outside the range of the array
indexes, no entry will be selected.
The dlgListView statement defines a multi column list view selection field with the contents
of the given array.
Headers is the tab separated list of column headers.
Selected reflects the index of the selected list view entry in the array
(the sequence in which the entries are actually displayed may be different, because the contents
of a dlgListView can be sorted by the various columns).
The first entry has index 0.
Sort defines which column should be used to sort the list view. The leftmost
column is numbered 1. The sign of this parameter defines the direction in which
to sort (positive values sort in ascending order). If Sort is 0 or
outside the valid number of columns, no sorting will be done. The returned value of
Sort reflects the column and sort mode selected by the user by clicking
on the list column headers. By default dlgListView sorts by the first
column, in ascending order.
Each element of array defines the contents of one line in the list view,
and must contain tab separated values. If there are fewer values in an element of array
than there are entries in the Headers string the remaining fields will be empty.
If there are more values in an element of array than there are entries in the
Headers string the superfluous elements will be silently dropped.
None of the strings in array may be empty (if there is an empty string,
all strings after and including that one will be dropped).
A list entry that contains line feeds ('\n') will be displayed in several
lines accordingly.
The optional statement is executed whenever the user double clicks on an entry
of the dlgListView (see dlgSelectionChanged
for information on how to have the statement called when only the selection in the list
changes).
If the initial value of Selected is outside the range of the array
indexes, no entry will be selected.
If Headers is an empty string, the first element of the array is used
as the header string. Consequently the index of the first entry is then 1.
The contents of a dlgListView can be sorted by any column by clicking on
that column's header. Columns can also be swapped by "click&dragging" a column
header. Note that none of these changes will have any effect on the contents of the
array.
If the contents shall be sorted alphanumerically a numeric string[] array
can be used.
The dlgPushButton statement defines a push button with the given Text.
If Text contains an '&', the character following the ampersand
will become a hotkey, and when the user hits Alt+hotkey, the button will be selected.
To have an actual '&' character in the text it has to be escaped.
If Text starts with a '+' character, this button will become the default
button, which will be selected if the user hits ENTER.
If the user selects a dlgPushButton, the given statement is executed.
The dlgRadioButton statement defines a radio button with the given Text.
If Text contains an '&', the character following the ampersand
will become a hotkey, and when the user hits Alt+hotkey, the button will be selected.
To have an actual '&' character in the text it has to be escaped.
dlgRadioButton can only be used within a dlgGroup.
If the user selects a dlgRadioButton, the index of that button within the dlgGroup
is stored in the Selected variable.
The optional statement is executed every time the dlgRadioButton is selected.
The dlgRealEdit statement defines a real entry field with the given Value.
If Value is initially outside the range defined by Min and Max
it will be limited to these values.
The dlgSpacing statement defines additional space in a vertical or horizontal box layout context.
Size defines the number of pixels of the additional space.
The dlgSpinBox statement defines a spin box entry field with the given Value.
If Value is initially outside the range defined by Min and Max
it will be limited to these values.
The dlgStretch statement defines an empty stretchable space in a vertical or horizontal box layout context.
Factor defines the stretch factor of the space.
The dlgStringEdit statement defines a one line text entry field with the given Text.
If History is given, the strings the user has entered over time are stored
in that string array. The entry field then has a button that allows the user to
select from previously entered strings. If a Size greater than zero is given,
only at most that number of strings are stored in the array. If History
contains data when the dialog is newly opened, that data will be used to initialize
the history. The most recently entered user input is stored at index 0.
The dlgTabPage statement defines a tab page with the given Title containing
the given statement.
If Title contains an '&', the character following the ampersand
will become a hotkey, and when the user hits Alt+hotkey, this tab page will be opened.
To have an actual '&' character in the text it has to be escaped.
Tab pages can only be used within a dlgTabWidget.
By default a dlgTabPage contains a dlgVBoxLayout,
so a simple tab page doesn't have to worry about the layout.
The dlgTabWidget defines a container for a set of tab pages.
tabpages must be a sequence of one or more dlgTabPage objects.
There must be no other dialog objects in this sequence.
Index defines which tab should be selected initially. If this selection
changes the variable Index is set accordingly. The first page has index
0 (independent of its title).
The dlgTextEdit statement defines a multiline text entry field with the given Text.
The lines in the Text have to be delimited by a newline character ('\n').
Any whitespace characters at the end of the lines contained in Text will be
removed, and upon return there will be no whitespace characters at the end of the lines.
Empty lines at the end of the text will be removed entirely.
The dlgTextView statement defines a multiline text viewer field with the given Text.
The Text may contain HTML tags.
External hyperlinks in the Text will be opened with the appropriate
application program.
If Link is given and the Text contains hyperlinks, statement
will be executed every time the user clicks on a hyperlink, with the value of Link
set to whatever the <a href=...> tag defines as the value of href.
If, after the execution of statement, the Link variable is not empty,
the default handling of hyperlinks will take place. This is also the case if Link
contains some text before dlgTextView is opened, which allows for an initial
scrolling to a given position.
If a Link is given, external hyperlinks will not be opened.
The dlgVBoxLayout statement opens a vertical box layout context for the given
statement.
By default a dlgDialog contains a dlgVBoxLayout,
so a simple dialog doesn't have to worry about the layout.
Layout contexts can be either grid, horizontal
or vertical.
The special objects dlgStretch and dlgSpacing
can be used to further refine the distribution of the available space.
To define two buttons that are pushed all the way to the right edge of the dialog,
you would write
The dlgAccept function causes the dlgDialog to be closed
and return after the current statement sequence has been completed.
Any changes the user has made to the dialog values will be accepted and are copied into
the variables that have been given when the dialog objects
were defined.
The optional Result is the value that will be returned by the dialog.
Typically this should be a positive integer value.
If no value is given, it defaults to 1.
Note that dlgAccept() does return to the normal program execution,
so in a sequence like
The dlgRedisplay function can be called to immediately refresh the
dlgDialog after changes have been made to the variables
used when defining the dialog objects.
You only need to call dlgRedisplay() if you want the dialog to be refreshed
while still executing program code. In the example below the status is changed
to "Running..." and dlgRedisplay() has to be called to make this change
take effect before the "program action" is performed. After the final status
change to "Finished." there is no need to call dlgRedisplay(), since
all dialog objects are automatically updated after leaving the statement.
The dlgReset function copies the initial values back into all
dialog objects of the current
dlgDialog.
Any changes the user has made to the dialog values will be discarded.
Calling dlgReject() implies a call
to dlgReset().
The dlgReject function causes the dlgDialog to be closed
and return after the current statement sequence has been completed.
Any changes the user has made to the dialog values will be discarded.
The variables that have been given when the dialog objects
were defined will be reset to their original values when the dialog returns.
The optional Result is the value that will be returned by the dialog.
Typically this should be 0 or a negative integer value.
If no value is given, it defaults to 0.
Note that dlgReject() does return to the normal program execution,
so in a sequence like
Calling dlgReject() implies a call to dlgReset().
The dlgSelectionChanged function can be used in a list context
to determine whether the statement of the dlgListView or dlgListBox was
called because the user double clicked on an item, or whether only the
current selection in the list has changed.
If the statement of a dlgListView or dlgListBox doesn't contain any
call to dlgSelectionChanged, that statement is only executed when the user
double clicks on an item in the list. However, if a ULP needs to react on changes
to the current selection in the list, it can call dlgSelectionChanged within
the list's statement. This causes the statement to also be called if the current
selection in the list changes.
If a list item is initially selected when the dialog is opened and the list's statement
contains a call to dlgSelectionChanged, the statement is executed with
dlgSelectionChanged returning true in order to indicate the initial change
from "no selection" to an actual selection. Any later programmatical changes to the strings
or the selection of the list will not trigger an automatic execution of the list's
statement. This is important to remember in case the current list item controls another
dialog object, for instance a dlgTextView that shows an extended representation of
the currently selected item.
To do this you need to prepend the character with a backslash, as in
Note that there are actually two backslash characters here, since this line
will first go through the User Language parser, which will strip the first backslash.
Text is considered to be HTML if the first line contains a tag.
If this is not the case, and you want the text to be formatted, you need to
enclose the entire text in the <html>...</html> tag.
The following table lists all supported HTML tags and their available attributes:
'b' for board files
'n' stands for a single digit number in
the range 1..9. Higher numbers indicate older files.
The fixed '#' character makes it easy to delete all backup files
from the operating system, using *.?#? as a wildcard.
Note that backup files with the same number 'n' do not necessarily
represent consistent combinations of board and schematic files!
The maximum number of backup copies can be set in the
backup dialog.
This safety backup file will have a name that follows the pattern
'b' for board files
The safety backup file will be deleted after a successful regular save
operation. If the drawing has not been saved with the WRITE command
(e.g. due to a power failure) this file can be renamed and loaded as a
normal board, schematic or library file, repectively.
The auto backup interval can be set in the backup dialog.
The locking mechanism uses a lock file named .file.lck
where file is the name of the file to be locked.
If an already locked file should be loaded, EAGLE offers several choices how to proceed,
like save the file with a different name, retry to load, delete or ignore the lock.
Retry can be used after the lock owner has closed the file.
Deleting the lock may fail depending on the file access rights you have for the lock file.
It's advisable to inform the lock owner in case you deleted his lock.
The delete option is also useful, if the lock file remained, for example after an unintended power failure.
If you decide to ignore the lock, you can edit the file, but you have to save it with a different
name. This option is convenient, if you do not intend to change the file but just want to
try or check something.
Locking is not applicable for the CAM processor and for read-only files loaded.
Locking can be switched off in the Control Panel menu Options / 'Backup / Locking' or with the
SET command.
If the locking is switched off, EAGLE respects locks from other users with locking enabled
(and reports this if necessary). It just doesn't create own locks.
The setting is stored in the eaglerc user file.
Normally a board and schematic will always be consistent as long as they
have never been edited separately (in which case the message
"No Forward&Back Annotation will be performed!"
will have warned you).
When loading a pair of board and schematic files the program will check
some consistency markers in the data files to see if these two files are
still consistent. If these markers indicate an inconsistency, you will be
offered to run an Electrical Rule Check (ERC),
which will do a detailed cross-check on both files.
If this check turns out positive, the two files are marked as consistent
and Forward&Back Annotation will be activated.
If the two files are found to be inconsistent the ERC protocol file will
be brought up in a dialog and Forward&Back Annotation will
not be activated.
Please do not be alarmed if you get a lot
of inconsistency messages. In most cases fixing one error (like renaming
a part or a net) will considerably reduce the number of error messages you get in the next
ERC run.
There are different types of licenses, varying in the number of users
who may use the program and in the areas of application the program
may be used in:
A typical application of this kind would be a user who has a PC at home
and also a notebook or laptop computer which he uses "on the road". As
he would only use one of these computers at a time it is ok to have EAGLE
installed on both of them.
If you receive an error message like
The Standard edition of EAGLE can't perform the requested action!
this means that you are attempting to do something that would violate
the limitations that apply to the EAGLE edition in use, like for example
placing an element outside of the allowed area.
All editions of EAGLE can be
used to view files created with the Premium or Ultimate edition,
even if these drawings exceed the editing capabilities of the edition
currently in use.
To check which edition your license has enabled, select
Help/About EAGLE from the Control Panel's menu.
ROUTE
Keyboard
ROUTE name ..
When you select an airwire (a connection on the Unrouted layer), routing begins at the
signal object connected to the airwire that is closest to your selection point.
Otherwise, the ROUTE command automatically creates a new airwire from your selected
route start point to a nearby target object that is a member of the same signal.
Once you begin routing, intermediate routed wires automatically track according to
your movements of the mouse (see also LINE). As you drag
intermediate wires around, remember that the Right mouse button cycles through the wire
bend styles, and the center mouse button changes the layer. Note that only those signal
layers (1 through 16) are available that have been entered into the layer setup in
the Design Rules.
Obstacle Avoidance
Two route modes are available for obstacle avoidance : Ignore Obstacles and Walkaround
Obstacles. The Obstacle Avoidance options consist of parameter buttons that appear on the toolbar
when the ROUTE command is active. The default setting is Walkaround Obstacles.
Selecting the routing layer and wire width
When you select an airwire, the ROUTE command determines the initial layer in
which to route by considering the objects at the starting point, as follows:
When you select an airwire, the ROUTE command determines the wire width from the
the Design Rules and the net class of the selected signal, if the flag
"Options/Set/Misc/Auto set route width and drill" is set. You can manually adjust
the width, and the intermidiate wires will appear with the new width. This
behavior applies to via definitions when a layer change is involved, as well.
Snap Function
Specifying a snap distance allows you to influence how the ROUTE command targets
same-signal objects that it should use as potential routing termination points.
The Snap Function comes into effect when you move the cursor within the snap radius
of the center of an object that is a target candidate for routing termination. In
this condition, the cursor automatically snaps to that object's location, and an (X)
is displayed at the location as a visual indicator that a snap was achieved.
The ROUTE command automatically utilizes the snap distance independent of the
current grid setting. Define the effective distance for this snap function with
the command
SET SNAP_LENGTH distance;
where the default unit for the "distance" snap radius is the current grid unit.
Undo Commit Sequence
If you make an errant mouse click or you wish to change your route path at any
time during the routing process, you can "undo" or "unwind" your routing. Use the
Backspace key (delete key on MacOS) to perform sequential undo's of your left mouse
commits. Via placements and layer changes are also undone by this process, as you
would expect.
Loop Removal
The Loop Remove mode allows you to re-route any portion of an existing path of routed
wires between two pads and automatically remove the redundant loop of wires (and
possibly vias). The Loop Remove option consists of parameter buttons that appear
on the toolbar when the ROUTE command is active.
Follow-me Router
With the special wire bend styles 8 and 9,
the ROUTE command works as a "Follow-me" router. This means that the selected airwire
will be routed fully automatically by the Autorouter.
Differential Pair routing
Differential Pairs are signals that need to be routed in parallel
and with a specific distance between them.
You can use the MEANDER command to balance the lengths
of the two signals that form a differential pair.
RUN
See also SCRIPT
The optional argument list is available to the ULP through the
Builtin Variables argc and argv.
Running a ULP from a script file
If a ULP is executed from a script file and the program returns an integer value
other than 0 (either because it has been terminated through a
call to the exit() function or because
the STOP button was clicked), execution of the script file will be terminated.
Editor commands resulting from running a ULP
A ULP can also use the exit() function with a string
parameter to send a command string back to the editor window.
SCRIPT
See also SET,
MENU,
ASSIGN,
EXPORT,
RUN
Examples
SCRIPT nofill executes nofill.scr SCRIPT myscr. executes myscr (no Suffix) SCRIPT myscr.old executes myscr.old
SCRIPT files contain EAGLE commands according to the syntax rules.
Lines beginning with '#' are comment.
Continued Lines
SCRIPT files contain one or more commands in every line according
to the syntax rules. The character '\' at the end of a command line ensures
that the first word of the next line is not interpreted as a command.
This feature allows you to avoid apostrophes in many cases.
Set Default Parameters
The SCRIPT file eagle.scr - if it exists in the project
directory or in the script path - is executed each time
a new drawing is loaded into an editor window (or when the drawing type is changed
in a library).Script Labels
The default SCRIPT file eagle.scr makes use of labels of the form Execute Script Files in the Library Editor
All of the layers are recognized only if the library editor has previously been loaded.
SET
Parameters which affect the behavior of the program, the screen display, or the user interface can be specified with the SET command. The precise syntax is described below.
SET options;
User Interface
Snap function SET SNAP_LENGTH number; This sets the limiting value for the snap function in the ROUTE command (using the current unit). It's also used for snapping nets to pins in the NET command. Default: 20 mil If tracks are being laid with the ROUTE command to pads that are not on the grid, the snap function will ensure that a route will be laid to the pad within the snap-length. SET CATCH_FACTOR value; Defines the distance from the cursor up to which objects are taken into account when clicking with the mouse. The value is entered relative to the height (or width, whichever is smaller) of the presently visible part of the drawing. It applies to a zoom level that displays at least a range of 4 inch and inrceases logarithmically when zooming further in. A value of 0 turns this limitation off.
Values < 1 are interpreted as factor, values ≥ 1 as percents.
Default: 0.05 (5%). SET SELECT_FACTOR value; This setting controls the distance from the cursor within which nearby objects will be suggested for selection. The value is entered relative to the height (or width, whichever is smaller) of the presently visible part of the drawing.
Values < 1 are interpreted as factor, values ≥ 1 as percents.
Default: 0.02 (2%).Menu contents SET USED_LAYERS name | number; Specifies the layers which will be shown in the associated EAGLE menus. See the example file mylayers.scr. The layers Pads, Vias, Unrouted, Dimension, Drills and Holes will in any case remain in the menu, as will the schematic layers. Any used signal layers also remain in the menus. SET Used_Layers All activates all layers. SET WIDTH_MENU value..; SET DIAMETER_MENU value..; SET DRILL_MENU value..; SET SMD_MENU value..; SET SIZE_MENU value..; SET ISOLATE_MENU value..; SET SPACING_MENU value..; SET MITER_MENU value..; SET DLINE_WIDTH_MENU value..; SET DLINE_EXT_WIDTH_MENU value..; SET DLINE_EXT_LENGTH_MENU value..; SET DLINE_EXT_OFFSET_MENU value..; The content of the associated popup menus can be configured with the above command for the parameters width etc.. A maximum of 16 values is possible for each menu (16 value-pairs in the SMD menu). Without any values (as in SET WIDTH_MENU;) the program default values will be restored. Example:
Grid Inch;
Set Width_Menu 0.1 0.2 0.3;Context menus SET CONTEXT objecttype text commands; For selectable object types context menus (right mouse button) can be extended
by arbitrary entries. objecttype is not case sensitive. text is the
menu text, commands is the command sequence, that is executed after click
on the menu entry. Empty spaces are possible if the expression is set into apostrophs.
apostrophs inside have to be doubled (see TEXT).
Example: SET CONTEXT Element Export 'run myexport.ulp'; To the context menu for elements the entry Export is added, which starts an according ULP. An existing userdefined entry can also be overwritten. The settings are stored in the eaglerc file. The number of entries is unlimited. Deletion of entries: SET CONTEXT objecttype; deletes all entries for this object type. With SET CONTEXT; all user defined menu entries are deleted. All selectable object types are supported. These are attribute, circle, dimension, element,
frame, gate, hole, instance, junction, label, modinst (module instance), pad, pin, rectangle, smd, text, via and wire. Restriction note on ULP execution: In order to have the selected object available for function ingroup() please avoid setting the ';' within the apostrophs
(i.e. not 'run myexport.ulp;', but 'run myexport.ulp'). Bend angle for wires and lines SET WIRE_BEND bend_nr; bend_nr can be one of: 0: Starting point - horizontal - vertical - end 1: Starting point - horizontal - 45° - end 2: Starting point - end (straight connection) 3: Starting point - 45° - horizontal - end 4: Starting point - vertical - horizontal - end 5: Starting point - arc - horizontal - end 6: Starting point - horizontal - arc - end 7: "Freehand" (arc that fits to wire at start, straight otherwise) 8: Route short end of airwire in Follow-me router 9: Route both ends of airwire in Follow-me router Note that 0, 1, 3 and 4 may contain additional miter wires (see MITER). SET WIRE_BEND @ bend_nr ...; Defines the bend angles that shall be actually used when switching with the right mouse button. SET WIRE_BEND @; Switches back to using all bend angles. Beep on/off SET BEEP OFF | ON; Screen display
Color for grid lines SET COLOR_GRID color; Layer color SET COLOR_LAYER layer color; Fill pattern for layer SET FILL_LAYER layer fill; Grid parameters SET MIN_GRID_SIZE pixels; The grid is only displayed if the grid size is greater than the set number of pixels. Min. text size shown SET MIN_TEXT_SIZE size; Text less than size pixels high is shown as a rectangle on the screen. The setting 0 means that all text will be displayed readably. Net wire display SET NET_WIRE_WIDTH width; Pad display SET DISPLAY_MODE REAL | NODRILL; REAL: Pads are displayed as they will be plotted.
NODRILL: Pads are shown without drill hole. SET PAD_NAMES OFF | ON; Pad names are displayed/not displayed. Bus line display SET BUS_WIRE_WIDTH width; DRC-Parameter SET DRC_FILL fill_name; Polygon calculation SET POLYGON_RATSNEST OFF | ON; See POLYGON command. Vector font SET VECTOR_FONT OFF | ON; See TEXT command. Cross-reference labels SET XREF_LABEL_FORMAT string; See LABEL command. Part cross-references SET XREF_PART_FORMAT string; See TEXT command. Mode parameters
Package check SET CHECK_CONNECTS OFF | ON; The ADD command checks whether every pin has been connected to a pad (with CONNECT). This check can be switched off. Nevertheless, no board can be generated from a schematic if a device is found which does not have a package. REPLACE mode SET REPLACE_SAME NAMES | COORDS; UNDO buffer on/off SET UNDO_LOG OFF | ON; Wire/Line optimizing SET OPTIMIZING OFF | ON; If set on, wires/lines which lie collinear after a MOVE, ROUTE or SPLIT are subsumed into a single wire/line. See also OPTIMIZE. Net wire termination SET AUTO_END_NET OFF | ON; Automatic ending of nets or busses. See NET or BUS. Automatic junctions SET AUTO_JUNCTION OFF | ON; Automatic setting of junctions. See JUNCTION. Automatic confirmation SET CONFIRM OFF | NO | YES | OPT1 | OPT2 | OPT3 | OPT4 | OPT5 | OPT6 | OPT7 | OPT8 | OPT9; Allows confirmation dialogs to be handled automatically (see below for details). File locking SET LOCKING OFF | ON; To deactivate or activate File locking. The setting takes effect immediately, so locks of currently open files are deleted resp. created. See File Locking for further details. Colors
There are three palettes for black, white and colored background,
respectively. Each palette has 64 color entries, which can be set to any
ARGB value. The palette entry number 0 is used as the background color
(in the "white" palette this entry cannot be modified, since this palette
will also be used for printing, where the background is always white).
SET PALETTE index argb
where index is a number in the range 0..63 and argb is a hexadecimal
value defining the Alpha, Red, Green and Blue components of the color, like 0xFFFFFF00
(which would result in a bright yellow). The alpha component defines how "opaque"
the color is. A value of 0x00 means it is completely transparent (i.e. invisible),
while 0xFF means it is totally opaque.
The alpha component of the background color is always 0xFF.
Note that the ARGB value must begin with "0x", otherwise it would be taken as a
decimal number. You can use
SET PALETTE BLACK|WHITE|COLORED
to switch to the black, white or colored background palette, respectively.
Note that there will be no automatic window refresh after this command, so
you should do a WINDOW; command after this.
0 Black 1 Blue 2 Green 3 Cyan 4 Red 5 Magenta 6 Brown 7 LGray 8 DGray 9 LBlue 10 LGreen 11 LCyan 12 LRed 13 LMagenta 14 Yellow 15 White
0 Empty 1 Solid 2 Line 3 LtSlash 4 Slash 5 BkSlash 6 LtBkSlash 7 Hatch 8 XHatch 9 Interleave 10 WideDot 11 CloseDot 12 Stipple1 13 Stipple2 14 Stipple3 15 Stipple4 Automatic Confirmation
At times EAGLE prompts the user with informational or warning messages,
or requires a decision on how to proceed. This may be unwanted in automated
processes (like script files).
The command
SET CONFIRM YES
will automatically confirm every message dialog as if the user had clicked on
the "positive" button ("OK" or "Yes"). The dialog itself isn't even presented
to the user.
Similarly, the command
SET CONFIRM NO
acts as if the user had clicked on the "negative" button ("No"), if such a button
is present. Otherwise it just confirms the dialog.
SET CONFIRM OPT2
NAME GND (x y)
Finally, the command
SET CONFIRM OFF
turns off automatic confirmation. If automatic confirmation is not turned off
explicitly, it will automatically fall back to OFF the next time the
editor window accepts some interactive input from the user.
SET CONFIRM YES
REMOVE filename
SET CONFIRM OFF
Be extremely careful when using this command! Blindly confirming message
dialogs may cause important messages to be overlooked. The result may then
not be what the user expected.
Board Limits (only Make Pro Edition)
The Make Pro Edition has a limited board area but allows variable width
and height (see EAGLE Editions). In order to adjust these limits, the commands
SET LIC_WIDTHwidth
SET LIC_HEIGHTheight
can be used. If width is set, then height adjusts accordingly and vice versa.
EagleRc Parameters
Sometimes a small detail of functionality needs to be made adjustable, for
instance because some users absolutely need to have it work differently.
These parameters are not available in any dialogs, but can only be changed
through an entry in the eaglerc file. In order to make this easier, any
parameter that is not found among the keywords listed above will be looked
up in the eaglerc parameters and can thus be changed using the SET command.
Principally all parameters from eaglerc file can be changed this way.
Note that the parameter names must be written in full and exactly as
listed below (case sensitive). The parameter value is typically '0' or '1',
to turn the functionality 'off' or 'on', respectively. After changing any
of these parameters that influence the way the screen display is drawn, a
window refresh may be necessary.
SET Option.DrawUnprocessedPolygonEdgesContinuous 1;
The following eaglerc parameters have been created for special adjustments:
123 renders layer 123 123t renders layer 123 if the output is "viewed from top" (not mirrored) 123b renders layer 123 if the output is "viewed from bottom" (mirrored) 123-140 renders layers 123 through 140 in the given sequence 140-123 renders layers 140 through 123 in the given sequence * inserts the default sequence of the internal layers 123b * 123t makes layer 123 always be rendered first
48t 49t 19t 47t 20t 46t 23 27 25 59 57 55 53 50 51 21 44t 45t 37 35 31 29 33 39 41 43t 18t 17t 1-16 17b 18b 43b 42 40 34 30 32 36 38 45b 44b 22 52 54 56 58 60 26 28 24 46b 20b 47b 19b 49b 48b 61-99.
When viewed from top, the layer sequence is rendered from right to left, while
when viewed from bottom (mirrored) it is rendered from left to right. For instance,
layer 48 (Document) is entered as 48t and 48b to always have it rendered as the last one.
Layers 21 (tPlace) and 22 (bPlace), on the other hand, are listed only once, to have
them rendered at the proper place, depending on whether the output is mirrored or not.
Any layers that are not explicitly mentioned in the layer sequence are rendered after
the given sequence in ascending order.
SHOW
See also INFO
SHOW name..
SHOW @ name..
Cross Probing
With active Forward&Back Annotation an object
that is highlighted with the SHOW command in a board will also be
highlighted in the schematic, and vice versa.
Different Objects
If you select different objects with the SHOW command every single
object is highlighted separately.
You can select more than one object for highlighting by pressing the
Ctrl key when clicking on the objects. When you click on an object that
is already highlighted with the Ctrl key pressed, that object will
be displayed non-highlighted again.
Small Objects
If the @ character is given in the command line, a pointer rectangle
is drawn around the shown object. This is helpful in locating small objects that
wouldn't show up too well just through highlighting. If more than one object is
shown, the rectangle is drawn around all the objects. It may be necessary to
zoom out (or do a WINDOW FIT command) in order to see the pointer.
If an object with the literal name @ shall be shown, the name must
be enclosed in single quotes.
Wildcards
If a name parameter is given, the characters '*', '?'
and '[]' are wildcards and have the following meaning:
* matches any number of any characters ? matches exactly one character [...] matches any of the characters between the brackets Objects on different Sheets
If an object given by name is not found on the current schematic sheet, a dialog
is presented containing a list of sheets on which the object is found. If the object
is not found on any sheet, the sheet number is '-' in this list. Note that this
dialog only appears if any of the objects given by name (or wildcards) is not found
on the current sheet. If all given objects are found on the current sheet, no dialog
appears (even if some of the objects are also present on other sheets). Once the
dialog appears, it contains all objects found, even those on the current sheet.
Examples
SHOW IC1
IC1 is highlighted and remains highlighted until the SHOW command is ended
or a different name is entered.
SHOW IC*
Highlights all objects with names starting with "IC".
SIGNAL
See also AUTO,
ROUTE,
NAME,
CLASS,
LINE,
RATSNEST,
EXPORT
SIGNAL signal_name ..
SIGNAL signal_name element_name pad_name..;
Mouse Input
To do that you select (with the mouse) the pads (or smds) of the elements
to be connected, step by step. EAGLE displays the part signals as airwires
in the Unrouted layer.
Text Input
Signals may also be defined completely by text input (via keyboard
or script file). The command
SIGNAL GND IC1 7 IC2 7 IC3 7;
connects pad 7 of IC1...3. In order to enter a whole netlist, a script
file may be generated, with the extension *.scr. This file
should include all of the necessary SIGNAL commands in the format shown
above.
Connection Check
If the SIGNAL command is used to connect pads (or smds) that already
belong to different signals, a popup menu will appear and ask the
user if he wants to connect the signals together, and which name the
signal should get.
Outlines data
The special signal name _OUTLINES_ gives a signal certain properties that
are used to generate outlines data.
This name should not be used otherwise.
SLICE
See also DELETE,
RIPUP
SMASH
See also NAME,
VALUE,
TEXT,
ATTRIBUTE
SMASH name ..
SMD
See also PAD,
CHANGE,
NAME,
ROUTE,
Design Rules
Roundness
The roundness has to be entered as an integer number between
0 and 100, with a negative sign to distinguish it
from the width parameters. A value of 0 results in fully
rectangular smds, while a value of 100 makes the corners
of the smd fully round. The command
SMD 50 50 -100 '1'
for example would create a completely round smd named '1' at the given
mouseclick position. This can be used to create BGA (Ball Grid Array) pads.
Arbitrary Pad Shapes
If the standard smd pad shapes are not sufficient for a particular package,
you can create arbitrary smd pad shapes by drawing a polygon around an smd pad,
or by drawing wires that have one end connected to the smd pad.
Names
SMD names are generated automatically and may be modified with the
NAME command. Names may be included
in the SMD command if enclosed in single quotes.
Flags
The following flags can be used to control the appearance of an smd:
NOSTOP don't generate solder stop mask NOTHERMALS don't generate thermals NOCREAM don't generate cream mask
A newly started SMD command resets all flags to their defaults. Once a flag is given
in the command line, it applies to all following smds placed within this SMD command.
Single Smds
Single smd pads in boards can only be used by defining
a package with one smd.
SPLIT
See also MITER,
MOVE,
OPTIMIZE,
SET
SET OPTIMIZING OFF;
has previously been given, or the wire has been clicked at the same
spot twice. In this case the split points remain and can be used,
for example, to reduce the width of a segment. This is achieved by
selecting the SPLIT command, marking the part of the wire which is
to be reduced with two mouse clicks, and using the command
CHANGE WIDTH width
The segment is then clicked on to complete the change.
TECHNOLOGY
See also PACKAGE,
ATTRIBUTE
TECHNOLOGY -name ..;
TECHNOLOGY -* ..;
Example
In a device named "74*00" the command
TECHNOLOGY -* '' L LS S HCT;
would first remove any existing technologies and then create the individual technology variants
7400
74L00
74LS00
74S00
74HCT00
TEXT
See also CHANGE,
MOVE,
MIRROR,
PIN,
ROTATE,
ATTRIBUTE
TEXT 'any_text' [orientation] ..
Orientation
The orientation of the text may be defined by the TEXT command (orientation)
using the usual definitions as listed in the ADD command (R0, R90
etc.). The right mouse button will change the rotation of the text
and the center mouse button will change the current layer.
Multi Line Texts
Texts can contain line breaks. In the text dialog they can be entered directly with
Shift-Enter, in the command line "\n" has to be used.
Special Characters
If the text contains several successive blanks or a semicolon, the
whole string has to be enclosed in single quotes. If the text contains
single quotes then each one itself has to be enclosed in single quotes.
If apostrophes are required in the text, each must be enclosed
in single quotes.
If the text shall contain plain backslashes, each one has to be escaped with another backslash.
(e.g. TEXT 'abc\\\\def' produces abc\\def).
Key Words
If the TEXT command is active and you want to type in a text that
contains a string that can be mistaken for a command (e.g. "red"
for "REDO") then this string has to be enclosed in single
quotes.
Text Height
The height and thickness of characters can be changed with the
CHANGE commands:
CHANGE SIZE text_size ..
CHANGE RATIO ratio ..
CHANGE LINEDISTANCE value ..
Maximum text height: 2 inches
Maximum text thickness: 200 mm (7.7840 inch)
Ratio: 0...31 (% of text height)
Line distance: 0...250 (% of text height).
Text Font
Texts can have three different fonts:
Vector the program's internal vector font Proportional a proportional pixel font (usually 'Helvetica') Fixed a monospaced pixel font (usually 'Courier')
CHANGE FONT VECTOR|PROPORTIONAL|FIXED ..
The program makes great efforts to output texts with fonts other than
Vector as good as possible. However, since the actual font is drawn
by the system's graphics interface, Proportional and Fixed fonts
may be output with different sizes and/or lengths.
You can use the SET Interface.VectorFont 0|1
command to change this setting.
You can use the SET VECTOR_FONT OFF|ON command
to change the setting in an existing board or schematic drawing.
Text Alignment
The text alignment defines where the origin shall be put within the text.
There are nine different possible alignments, which consist of combinations
of the keywords left, bottom, center, right
and top. These keywords can be given in any sequence, but only the
last one of left/right and top/bottom will be taken into account for the
respective direction. The center keyword only applies to those directions
where no other keyword has been given. The default is left and bottom.
CHANGE ALIGN TOP CENTER; TEXT 'ABC' draws the text ABC with the origin at its top/center Character Sets
Only the characters with ASCII codes below 128 are guaranteed to be printed correctly.
Any characters above this may be system dependent and may yield different results
with the various fonts.
Text Variables
Special texts in a symbol or package drawing, marked with the '>'
character, will be replaced with actual values in a board or schematic:
>NAME Component name (ev.+gate name) 1) >VALUE Comp. value/type 1) >PART Component name 2) >GATE Gate name 2) >XREF Part cross-reference 2) >CONTACT_XREF Contact cross-reference 2) >ASSEMBLY_VARIANT Name of the current assembly variant >DRAWING_NAME Drawing name >LAST_DATE_TIME Time of the last modification >PLOT_DATE_TIME Time of the plot creation >SHEETNR Sheet number of a schematic 3) >SHEETS Total number of sheets of a schematic 3) >SHEET equivalent to ">SHEETNR/>SHEETS" 3) >MODULE Module name (available in module sheets, otherwise empty) 3) >SHEETNR_TOTAL Sheet number of a schematic with modules 3) >SHEETS_TOTAL Total number of sheets of a schematic with modules 3) >SHEET_TOTAL equivalent to ">SHEETNR_TOTAL/>SHEETS_TOTAL" 3)
2) Only for symbol
3) Only for symbol or schematic
%S the sheet number %C the column on the sheet %R the row on the sheet Attributes
If a symbol or package drawing shall display an attribute
of the actual part or element, a text with the name of that attribute, marked with
the '>' character, can be used. By default, only the actual value of the
given attribute will be displayed. If the attribute name is followed by one of the
special characters '=', '~' or '!', the actual display
is as follows:
>ABC 123 >ABC= ABC = 123 >ABC~ ABC >ABC! nothing Overlined text
Text can be overlined, which is useful for instance for the names of inverted
signals ("active low", see also
NET, BUS and PIN).
To do so, the text needs to be preceded with an exclamation mark ('!'), as in
!RESET
which would result in
_____
RESET
This is not limited to signal names, but can be used in any text. It is
also possible to overline only part of a text, as in
!RST!/NMI
R/!W
which would result in
___
RST/NMI
_
R/W
Note that the second exclamation mark indicates the end of the overline.
There can be any number of overlines in a text. If a text shall contain
an exclamation mark that doesn't generate an overline, it needs to be
escaped by a backslash. In order to keep the need for escaping exclamation
marks at a minimum, an exclamation mark doesn't start an overline if it
is the last character of a text, or if it is immediately followed by a
blank, a double or single quote, or by a right
parenthesis, bracket or brace. Any non-escaped exclamation mark or comma
that appears after an exclamation mark that started an overline will end
the overline (the comma as an overline terminator is necessary for busses).
UNDO
See also REDO,
SET,
Forward&Back Annotation
UNDO LIST
SET UNDO_LOG OFF;
UNDO/REDO is completely integrated within Forward&Back Annotation.
UNDO buffer dialog
The option LIST in the UNDO command opens a dialog that contains the
entire contents of the undo buffer. You can navigate through the list of
undo/redo steps by click&dragging the list delimiter, or by directly
clicking on any given step you wish to go back or forward to. If there
are several steps between the current delimiter position and the clicked
list item, all steps in between will be executed in the proper sequence.
Going upward in the list means doing UNDO, going downward results in REDO.
The icon at each list item indicates in which drawing this particular command
has been executed.
UPDATE
See also ADD,
REPLACE
UPDATE;
UPDATE library_name..;
UPDATE package_name@library_name..;
UPDATE +@ | -@ [library_name..];
UPDATE old_library_name = new_library_name;
Update in a board or schematic
If the command is terminated with a ';', but has no parameters,
all parts will be checked.
Update in a library
The update in a library replaces all packages within that library with the versions
from the given libraries.
USE
See also ADD,
REPLACE
USE -*;
USE library_name..;
USE -library_name..;
Using Libraries via the Control Panel
Libraries can be easily marked for use in the Control Panel
by clicking on their activation icon (which changes its color to indicate that this
library is being used), or by selecting "Use" from the library's context menu.
Through the context menu of the "Libraries" entry in the Control Panel it is also
possible to use all of the libraries or none of them.
Used Libraries and Projects
The libraries that are currently in use will be stored in the project file
(if a project is currently open).
Examples
USE opens the file dialog to choose a library USE -*; drops all previously marked libraries USE demo trans*; marks the library demo.lbr and all libraries with names matching trans*.lbr USE -* /eagle/lbr; first drops all previously marked libraries and then marks all libraries from the directory /eagle/lbr VALUE
See also NAME,
SMASH,
VARIANT
VALUE value ..
VALUE name value ..
VALUE ON;
VALUE OFF;
In Boards and Schematics
Elements can be assigned a value, e.g. '1k' for a resistor or '10uF'
for a capacitor. This is done with the VALUE command. The
command selects an element and opens a popup menu that allows you
to enter or to change a value.
Example
VALUE R1 10k R2 100k
In this case more than one element has been assigned a value. This
possibility can be used in script files:
VALUE R1 10k \
R2 100k \
R3 5.6k \
C1 10uF \
C2 22nF \
...
The '\' prevents the following line from being mistaken for an EAGLE
key word.
In Device Mode
If the VALUE command is used in the device edit mode, the parameters
ON and OFF may be used:
VARIANT
See also VALUE,
TECHNOLOGY
VARIANT name part_name [NO]POPULATE [ value [ technology ] ];
VARIANT [ + | - ] name;
Module Assembly Variants
Assembly variants can also be created for a module. A specific assembly variant
of the module can be selected in each module instance that refers to it.
VIA
See also SMD,
CHANGE,
DISPLAY,
SET,
PAD,
Design Rules
Signal name
The signal_name parameter is intended mainly to be used in
script files that read in generated data. If a signal_name
is given, all subsequent vias will be added to that signal, and no
automatic checks will be performed.
This feature should be used with great care because it could result
in short circuits, if a via is placed in a way that it would connect
wires belonging to different signals. Please run a
Design Rule Check after using the VIA command
with the signal_name parameter!
Via diameter
Entering a number changes the diameter of the via (in the actual
unit) and the value remains in use for further vias. Via diameters
can be up to 200 mm (7.7840 inch).
CHANGE DRILL diameter
Shape
A via can have one of the following shapes:
Round
Octagon
Layers
The layers parameter defines the layers this via shall
cover. The syntax is from-to, where 'from' and 'to' are the layer numbers
that shall be covered. For instance 2-7 would create a via that goes from
layer 2 to layer 7 (7-2 would have the same meaning). If that exact via is
not available in the layer setup of the Design Rules, the next longer via
will be used (or an error message will be issued in case no such via can be
set). With SET Option.ViaLength 1
the via length is textually displayed.
Flags
The following flags can be used to control the appearance of a via:
STOP always generate solder stop mask WINDOW
The WINDOW command is used to zoom in and out of the drawing and to
change the position of the drawing on the screen. The command can
be used with up to three mouse clicks. If there are fewer, it must
be terminated with a semicolon.
WINDOW ;
WINDOW ;
WINDOW
WINDOW scale_factor
WINDOW FIT
WINDOW LAST
F2: WINDOW; Redraw screen
F3: WINDOW 2 Zoom in by a factor of 2
F4: WINDOW 0.5 Zoom out by a factor of 2
F5: WINDOW (@); Cursor pos. is new center (if a command is active)
Refresh screen
If you use the WINDOW command followed by a semicolon, EAGLE redraws
the screen without changing the center or the scale. This is useful
if error messages cover part of the drawing.
New center
The WINDOW command with one point causes that point to become
the center of a new screen display of the drawing. The scaling of
the drawing remains the same. You can also use the sliders of the
working area to move the visible area of the drawing. The function
key F5 causes the current position of the cursor to be the new center.
Corner points
The WINDOW command with two points defines a rectangle with
the specified points at opposite corners. The rectangle expands to
fill the screen providing a close-up view of the specified portion
of the drawing.
New center and zoom
You can use the WINDOW command with three points. The first
point defines the new center of the drawing and the display becomes
either larger or smaller, depending on the ratios of the spacing between
the other points. In order to zoom in, the distance between point
1 and point 3 should be greater than the distance between point 1
and 2; to zoom out place point 3 between points 1 and 2.
Zoom in and out
WINDOW 2;
Makes the elements appear twice as large.
WINDOW 0.5;
Reduces the size of the elements by a factor of two.
The whole drawing
WINDOW FIT;
fits the entire drawing on the screen.
Back to the previous window
WINDOW LAST;
switches back to the previous window selection. A window selection is stored by
every WINDOW command, except for zoom-only WINDOW commands and modifications of
the window selection with the mouse.
Very large zoom factors
By default the maximum zoom factor is limited in such a way that
an area of 1mm (about 40mil) in diameter will be shown using the full editor window.
If you need to zoom in further, you can uncheck "Options/User interface/Limit zoom factor"
and will then be able to zoom in all the way until the finest editor grid
can be seen.
Parameter Aliases
Parameter aliases can be used to define certain parameter settings to the
WINDOW command, which can later be referenced by a given name.
The aliases can also be accessed by clicking on the "WINDOW Select" button
and holding the mouse button pressed until the list pops up.
A right click on the button also pops up the list.
Example:
WIRE
WRITE
The WRITE command is used to save a drawing or library or design block. If 'name'
is entered, EAGLE will save the file under the new name.
WRITE name
WRITE @name
WRITE [ DBL ] name
Generate and write a Design Block
General
With option DBL, a desgin block is generated from the currently loaded schematic and/or board
(depending, from which editor executed and whether schematic and board are in consistent state)
and saved under the given name.
Consistent Selection
Via the pulldown menu entry File/"Save selection as Design Block" it is possible to select
parts of the current schematic, board or of both and save it as a design block.
In the second editor, initially the corresponding objects from first editor are selected
for f/b annotation
(e.g element R1 if part instance R1 has been selected first). With the selection in the
second editor additional objects can be selected, as long as they do not disturb consistency.
Selection or deselection of any objects that would disturb consistency are automatically
filtered out.
For example objects without electrical meaning like texts, dimensions etc. can be selected,
routed wires or polygons from signals can be added or removed from the selection
if the corresponding nets have been selected.
The selection can be finished with another Ctrl-Rightclick and the design block dialog appears.
Now the combined selection is visible in the preview and can be saved as a desgin block
for future reuse.
The combined selection is only possible if a consistent schematic/board pair is loaded
and it works in both directions. It is not supported yet within hierarchical designs.
Selection criteria
If the schematic has multiple sheets and the selection is started from board, only objects
with counterparts on current sheet are supported.
If the selection is started from schematic, it is checked that the user selects net segments
completely, in particular not leaving behind some net wires or labels.
For each part all it's instances must be selected.
With a net segment being selected, all connected part instances connected to this segment must be selected.
Generating Output
Printing
The parameters for printing to the system printer can be modified through
the following three dialogs:
Printing a Drawing
If you enter the PRINT command without a
terminating ';', or select Print from the
context menu of a drawing's icon in the
Control Panel, you will be presented a dialog
with the following options:
Paper
Selects which paper format to print on.
Orientation
Selects the paper orientation.
Preview
Turns the print preview on or off.
Mirror
Mirrors the output.
Rotate
Rotates the output by 90°.
Upside down
Rotates the drawing by 180°. Together with Rotate the drawing is rotated by a total of 270°.
Black
Ignores the color settings of the layers and prints everything in black.
Solid
Ignores the fill style settings of the layers and prints everything in solid.
Scale factor
Scales the drawing by the given value.
Page limit
Defines the maximum number of pages you want the output to use.
In case the drawing does not fit on the given number of pages, the actual scale factor
will be reduced until it fits.
The default value of 0 means no limit.
All
All sheets of the schematic will be printed
(this is the default when selecting Print from the
context menu of a schematic drawing's icon).
From...to
Only the given range of sheets will be printed.
This
Only the sheet that is currently being edited will be printed
(this is the default when using the PRINT command
from a schematic editor window).
Hierarchy
The sheets of modules are printed for each use in a module instance
with the according part and net names.
Printer...
Invokes the system printer dialog, which enables you to choose which printer
to use and to set printer specific parameters.
PDF...
Creates a PDF (Portable Document Format) file with the given print settings.
Printing a Text
If you select Print from the
context menu of a text file's icon in the
Control Panel, or from the File
menu of the Text Editor, you will be presented
a dialog with the following options:
Wrap long lines
Enables wrapping lines that are too long to fit on the page width.
Printer...
Invokes the system printer dialog, which enables you to choose which printer
to use and to set printer specific parameters.
PDF...
Creates a PDF (Portable Document Format) file with the given print settings.
Printer Page Setup
The Print dialog provides several options that are used to define how a drawing or text
shall be placed on the paper.
Border
Defines the left, top, right and bottom borders. The values are either in
millimeters or inches, depending on which unit results in fewer decimals.
Calibrate
If you want to use your printer to produce production layout drawings,
you may have to calibrate your printer to achieve an exact 1:1
reproduction of your layout.
Aligment
Defines the vertical and horizontal alignment of the drawing on the paper.
Caption
Activates the printing of a caption line, containing the time and date
of the print as well as the file name.
CAM Processor
The CAM Processor allows you to output any combination of layers
to a device or file.
Main CAM Menu
The Main CAM Menu is where you select which file to process,
edit drill rack and aperture wheel files, and load or save job files.
File
Open Board... open a board file for processing Drill rack... open a drill rack file for editing Wheel... open an aperture wheel file for editing Job... switch to an other job (or create a new one) Save job... save the current job Close close the CAM Processor window Exit exit from the program Layer
Deselect all deselect all layers Show selected show only the selected layers Show all show all layers Window
Control Panel switch to the Control Panel 1 Schematic - ... switch to window number 1 2 Board - ... switch to window number 2 Help
General help opens a general help page Contents opens the help table of contents CAM Processor displays help for the CAM Processor Job help displays help about the Job mechanism Device help displays help about output devices CAM Processor Job
A CAM Processor Job consists of several Sections,
each of which defines a complete set of CAM Processor parameters
and layer selections.
Section
The Section selector shows the currently active job section.
By pressing the button you can select any of the sections you have defined
previously with the Add button.
Prompt
If you enter a text in this field, the CAM Processor will prompt you with
this message before processing that particular job section. For example you
might want to change the paper in your pen plotter for each plot, so the
message could be "Please change paper!". Each job section can have its own
prompt message, and if there is no message the section will be processed
immediately.
Add
Click on the Add button to add a new section to the job.
You will be asked for the name of that new job section. The new job section
will be created with all parameters set to the values currently shown
in the menu.
Please note that if you want to create a new job section, you should
first add that new section and then modify the
parameters. Otherwise, if you first modify the parameters of the current
section and then add a new section, you will be prompted to confirm whether
the modifications to the current section shall be saved or not.
Del
Use the Del button to delete the current job section.
You will be prompted to confirm whether you really want to delete that
section.
Process Section
The Process Section button processes the current job section, as
indicated in the Section selector.
Process Job
The Process Job button processes the entire job by processing
each section in turn, starting with the first section. What happens is
the same as if you would select every single section with the
Section selector and press the Process Section button for
each section - just a lot more convenient!
Output Device
The Output Device defines the kind of output the CAM Processor
is to produce. You can select from various device types, like photo plotters,
drill stations etc.
Device
Clicking on the button of the Device selector
opens a list of all available output devices.
Scale
On devices that can scale the output you can enter a scaling factor in
this field. Values larger than 1 will produce an enlarged output,
values smaller than 1 will shrink the output.
File
You can either enter the name of the
output file
directly into this field, or click on the
File button
to open a dialog for the definition of the output file.
If you want to derive the output filename from the input data file, you
can enter a partial filename (at least an extension, e.g. .gbr),
in which case the rest of the filename will be taken from the input data
filename.
Wheel
You can either enter the name of the
aperture wheel file
directly into this field, or click on the Wheel button
to open a file dialog to select from.
If you want to derive the output filename from the input data file, you
can enter a partial filename (at least an extension, e.g. .whl),
in which case the rest of the filename will be taken from the input data
filename.
Rack
You can either enter the name of the
drill rack file
directly into this field, or click on the Rack button
to open a file dialog to select from.
If you want to derive the output filename from the input data file, you
can enter a partial filename (at least an extension, e.g. .drl),
in which case the rest of the filename will be taken from the input data
filename.
Some drill devices (like EXCELLON, for instance) can automatically generate the
necessary drill definitions, in which case this field is not present.
Device Parameters
Depending on the type of output device
you have selected, there are several device specific parameters that
allow you to adjust the output to your needs:
Aperture Wheel File
A photoplotter usually needs to know which apertures are
assigned to the codes used in the output file. These assignments
are defined in an Aperture Wheel File.
Examples
D010 round 0.004
D040 square 0.004
D100 rectangle 0.060 x 0.075
D104 oval 0.030 x 0.090
D110 draw 0.004
Note that the file may contain several apertures that share the same D-code,
as long as all of these have a type from draw or round, and have
the same size.
This can be used to map apertures that effectively result in the
same drawing to a common D-code.
Aperture Emulation
If the item "Apertures" is selected, apertures not available are
emulated with smaller apertures. If this item is not selected,
no aperture emulation will be done at all.
Aperture Tolerances
If you enter tolerances for draw and/or flash apertures the CAM
Processor uses apertures within the tolerances, provided the aperture
with the exact value is not available.
Drill Rack File
If a drill station driver can't automatically generate the necessary drill
definitions, it needs to know which drill diameters
are assigned to the codes used in the output file. These assignments
are defined in a Drill Rack File.
Example
T01 0.010
T02 0.016
T03 0.032
T04 0.040
T05 0.050
T06 0.070
Drill Tolerances
If you enter tolerances for drills the CAM Processor uses drill
diameters within the tolerances, provided the drill with the exact
value is not available.
Offset
Offset in x and y direction (inch, decimal number).
Printable Area
Height
Printable area in Y direction (inch).
Width
Printable area in X direction (inch).
Pen Data
Diameter
Pen diameter in mm. Is used for the calculation of lines
when areas have to be filled.
Velocity
Pen velocity in cm/s for pen plotters which can be adjusted
to different speeds.
Defining Your Own Device Driver
The drivers for output devices are defined in the text file eagle.def.
There you find details on how to define your own driver. It is
advisable to copy the whole section of an existing driver of the same
device category and to edit the parameters which are different.
Output File
The Output File contains the data produced by the CAM Processor.
-------------------------------------------------------
File Layers Meaning
-------------------------------------------------------
*.cmp Top, Via, Pad Component side
*.ly2 Route2, Via, Pad Inner signal layer
*.ly3 Route3, Via, Pad Inner signal layer
... ...
*.sol Bot, Via, Pad Solder side
*.plc tPl, Dim, tName, Silkscreen comp. side
*.pls bPl, Dim, bName, Silkscreen solder side
*.stc tStop Solder stop mask comp. side
*.sts bStop Solder stop mask sold. side
*.drd Drills, Holes Drill data for NC drill st.
-------------------------------------------------------
Placeholders
The output file name can either be entered directly, or can be dynamically
composed using placeholders. A placeholder consists of a percentage
character ('%') followed by a letter. The following
placeholders are defined:
%D{xxx} a string that is inserted only into the data file name %E the loaded file's extension (without the '.') %H the user's home directory %I{xxx} a string that is inserted only into the info file name %L the layer range for blind&buried vias (see below) %N the loaded file's name (without path and extension) %P the loaded file's directory path (without file name) %% the character '%' Drill data with blind&buried vias
If the board contains blind or buried vias, the CAM
Processor generates a separate drill file for each via length that is
actually used in the board. The file names are built by adding the number
of the start and end layer to the base file name, as in
boardname.drl.0104
which would be the drill file for the layer stack 1-4. If you want to have
the layer numbers at a different position, you can use the placeholder %L,
as in
%N.%L.drl
which would result in
boardname.0104.drl
The drill info file name is always generated without layer numbers, and
any '.' before the %L will be dropped.
Any previously existing files that would match the given drill file name
pattern, but would not result from the current job, will be deleted before
generating any new files. There will be one drill info file per job, which
contains (amoung other information) a list of all generated drill data files.
Flag Options
Mirror
Mirror output. This option normally causes negative
coordinates, therefore it should be used only if "pos. Coord." is
selected, too.
Rotate
Rotate drawing by 90 degrees. This option normally causes
negative coordinates, therefore it should be used only if "pos.
Coord." is selected, too.
Upside down
Rotate the drawing by 180 degrees. Together with Rotate, the
drawing is rotated by a total of 270 degrees. This option normally causes
negative coordinates, therefore it should be used only if "pos.
Coord." is selected, too.
pos. Coord
Offsets the output so that negative coordinates are
eliminated and the drawing is referenced to the origin of the output device.
This is advisable for devices which generate error messages if
negative coordinates are detected.
Quickplot
Draft output which shows only the outlines of objects (subject to availability
on the selected output device).
Optimize
Activates the optimization of the drawing sequence for plotters.
Fill pads
Pads will be filled. This function can be properly executed only with
generic devices, like PostScript.
If this option is not selected, the drill holes of pads will be visible
on the output.
Layers and Colors
Select the layer combination by clicking the check boxes in the
Layer list.
-------------------------------------------------------
File Layers Meaning
-------------------------------------------------------
*.cmp Top, Via, Pad Component side
*.ly2 Route2, Via, Pad Inner signal layer
*.ly3 Route3, Via, Pad Inner signal layer
... ...
*.sol Bot, Via, Pad Solder side
*.plc tPl, Dim, tName, Silkscreen comp. side
*.pls bPl, Dim, bName, Silkscreen solder side
*.stc tStop Solder stop mask comp. side
*.sts bStop Solder stop mask sold. side
*.drd Drills, Holes Drill data for NC drill st.
-------------------------------------------------------
Outlines data
EAGLE can produce outlines data which can be used for milling prototype boards.
Preparing the board
Outlines data is produced by defining a POLYGON
in the layer for which the outlines shall be calculated.
This polygon must have the following properties:
If a polygon with these properties is present in your board, the
RATSNEST command will calculate it in such
a way that its contours correspond to the lines that have to be drawn by
the milling tool to isolate the various signals from each other.
The fillings of the calculated polygon define what has to be milled out
if you want to completely remove all superfluous copper areas.
Extracting the data
The outlines data can be extracted from the board through a
User Language Program. The outlines.ulp
program that comes with EAGLE implements this entire process. If you want to
write your own ULP you can use outlines.ulp as a starting point.
See the help page for UL_POLYGON for details
about how to retrieve the outlines data from a polygon object.
Milling tool diameter
The diameter of the milling tool (and thus the Width of the polygon) must
be small enough to fit between any two different signals in order to be able to
isolate them from each other.
Make sure you run a Design Rule Check (DRC) with
all Clearance values for different signals set to at least the diameter
of your milling tool!
Cleaning up
Make sure that you always delete the _OUTLINES_ polygon after generating the
outlines data. Leaving this polygon in your drawing will cause short circuits
since this special polygon does not adhere to the Design Rules!
Group Default ON
Eagle includes by default a new and more intuitive way to work.
Autorouter
The integrated Autorouter can be started from a board window with the
AUTO command.
Design Checks
There are two integrated commands that allow you to check your design:
The ERC is performed in a schematic window, and checks the design for
electrical consistency.
Design Rules
Design Rules define all the parameters that the board layout has to follow.
File
The File tab shows a description of the current set of Design Rules and
allows you to change that description (this is strongly recommended if you define
your own Design Rules). There are also buttons to load a different set of Design
Rules from a disk file and to save the current Design Rules to disk.
Note that the Design Rules are stored within the board file, so they will be in effect
if the board file is sent to a board house for production. The "Load..." and "Save as..."
buttons are merely for copying a board's Design Rules to and from disk.
Layers
The Layers tab defines which signal layers the board actually uses, how thick
the copper and isolation layers are, and what kinds of vias can be placed
(note that this applies only to actual vias; so even if no via from layer 1 to
16 has been defined in the layer setup, pads will always be allowed).
(1*16)
would mean a two layer board, using layers 1 and 16 and vias going through the
entire board (this is also the default value).
When building a multilayer board the setup could be something like
((1*2)+(15*16))
which is a four layer board with layer pairs 1/2 and 15/16 built on core material
and vias drilled through them, and finally the two layer pairs pressed together
with prepreg between them, and vias drilled all the way through the entire board.
Besides vias that go trough an entire layer stack (which are commonly referred to
as buried vias in case they have no connection to the Top and Bottom layer)
there can also be vias that are not drilled all the way through a layer stack, but
rather end at a layer inside that stack. Such vias are known as blind vias
and are defined in the "Setup" string by enclosing a sequence of layers with
[t:...:b], where t and b are the layers up to which that via
will go from the top or bottom side, respectively. A possible setup with blind
vias could be
[2:1+((2*3)+(14*15))+16:15]
which is basically the previous example, with two additional outer layers that are
connected to the next inner layers by blind vias. It is also
possible to have only one of the t or b parameters, so for instance
[2:1+((2*3)+(15*16))]
would also be a valid setup. Finally, blind vias are not limited to starting
at the Top or Bottom layer, but may also be used in inner layer stacks, as in
[2:1+[3:2+(3*4)+5:4]+16:5]
A blind via from layer a to layer b also implements all possible
blind vias from layer a to all layers between layers a and b, so
[3:1+2+(3*16)]
would allow blind vias from layer 1 to 2 as well as from 1 to 3.
Clearance
The Clearance tab defines the various minimum clearance values between objects
in signal layers. These are usually absolute minimum values that are defined by the
production process used and should be obtained from your board manufacturer.
The actual minimum clearance between objects that belong to different signals will
also be influenced by the net classes the two signals belong to.
Distance
The Distance tab defines the minimum distance between objects in signal layers
and the board dimensions, as well as that between any two drill holes.
Note that only signals that are actually connected to at least one pad or
smd are checked against the board dimensions. This allows edge markers to be drawn
in the signal layer without generating DRC errors.
Sizes
The Sizes tab defines the minimum width of any objects in signal layers and
the minimum drill diameter. These are usually absolute minimum values that are defined by the
production process used and should be obtained from your board manufacturer.
The actual minimum width of signal wires and drill diameter of vias will
also be influenced by the Net Class the signal belongs to.
Restring
The Restring tab defines the width of the copper ring that has to remain after the
pad or via has been drilled. Values are defined in percent of the drill diameter and
there can be an absolute minimum and maximum limit. Restrings for pads can be different
for the top, bottom and inner layers, while for vias they can be different for the
outer and inner layers.
If the actual diameter of a pad (as defined in the library) or a via would result in a
larger restring, that value will be used in the outer layers. Pads in library packages
can have their diameter set to 0, so that the restring will be derived entirely
from the drill diameter.
Shapes
The Shapes tab defines the actual shapes for smds and pads.
Smds are normally defined as rectangles in the library (with a "roundness" of 0),
but if your design requires rounded smds you can specify the roundness factor here.
Pads are normally defined as octagons in the library (long octagons where this makes
sense), and you can use the combo boxes to specify whether you want to have
pads with the same shapes as defined in the library, or always square, round or
octagonal. This can be set independently for the top and bottom layer.
If the "first" pad of a package has been marked as such in the library
it will get the shape as defined in the third combo box (either round, square or
octagonal, or no special shape).
The Elongation parameters define the appearance of pads with shape Long or Offset.
Supply
The Supply tab defines the Thermal isolation between pads and signal
polygons.
Masks
The Masks tab defines the dimensions of solder stop and cream masks. They are
given in percent of the smaller dimension of smds, pads and vias and can have an
absolute minimum and maximum value.
Solder stop masks are generated for smds, pads and those vias that have a drill diameter
that exceeds the given Limit parameter.
Cream masks are generated for smds only.
Misc
The Misc tab allows you to turn on a grid and angle check.
Beside that you can define whether checking for texts in signal layers not written in vectorfont
shall be made (default on). There's also an option for checking for copper in restricted areas
(layers tRestrict/bRestrict. Default is on).
Cross-references
There are various methods that can be used to create cross-references
in EAGLE schematic drawings. The following sections describe each of them.
Cross-reference labels
A plain label can be used to make the name of a net visible in a schematic.
If a label has the xref property activated, its behavior is changed
so that it becomes a cross-reference label.
Part cross-references
Electrical schematics often use electro-mechanical relays, consisting of a
coil and one or more contact symbols. If the coil and contacts are distributed
over various schematic sheets, it is useful to have each contact indicate
which sheet its coil is on. This can be achieved by giving the coil gate in
the device set an add level of Must (see the ADD
command) and placing the text variable '>XREF' somewhere in the
contacts' symbols (see the TEXT command).
Contact cross-references
On a multi-sheet electrical schematic with electro-mechanical relays that
have their coils and contacts distributed over various sheets, it is useful
to be able to see which sheets the individual contacts of a relay are on.
EAGLE can automatically display this contact cross-reference for each
relay coil if the following conditions are met.
User Language
The EAGLE User Language can be used to access the EAGLE data structures
and to create a wide variety of output files.
Syntax lists the rules a ULP file has to follow Data Types defines the basic data types Object Types defines the EAGLE objects Definitions shows how to write a definition Operators lists the valid operators Expressions shows how to write expressions Statements defines the valid statements Builtins lists the builtin constants, functions etc. Dialogs shows how to implement a graphical frontent to a ULP Writing a ULP
A User Language Program is a plain text file which is written in a C-like
syntax.
User Language Programs use the extension .ulp.
You can create a ULP file with any text editor (provided it does
not insert any additional control characters into the file) or you can
use the builtin text editor.
#usage "Add the characters in the word 'Hello'\n"
"Usage: RUN sample.ulp"
// Definitions:
string hello = "Hello";
int count(string s)
{
int c = 0;
for (int i = 0; s[i]; ++i)
c += s[i];
return c;
}
// Statements:
output("sample") {
printf("Count is: %d\n", count(hello));
}
If the #usage directive is present,
its value will be used in the Control Panel to display a description
of the program.
Executing a ULP
User Language Programs are executed by the
RUN command from an editor window's command line.
Syntax
The basic building blocks of a User Language Program are
All of these have to follow certain syntactical rules, which are
described in their respective sections.
Whitespace
Before a User Language Program can be executed, it has to be read in from
a file. During this read in process, the file contents is parsed
into tokens and whitespace.
string s = "Hello World";
where the blank character between 'o' and 'W' remains part
of the string.
"Hello \
World"
is parsed as "Hello World"
Comments
When writing a User Language Program it is good practice to add some
descriptive text, giving the reader an idea about what this particular
ULP does. You might also want to add your name (and, if available, your
email address) to the ULP file, so that other people who use your program
could contact you in case they have a problem or would like to suggest
an improvement.
/* some comment text */
which marks any characters between (and including) the opening
/* and the closing */ as comment. Such comments may expand over
more than one lines, as in
/* This is a
multi line comment
*/
but they do not nest. The first */ that follows any /*
will end the comment.
int i; // some comment text
which marks any characters after (and including) the // and up
to (but not including) the newline character at the end of the line as
comment.
Directives
The following directives are available:
#include
#require
#usage
#include
A User Language Program can reuse code in other ULP files through the #include
directive. The syntax is
#include "filename"
The file filename is first looked for in the same directory as
the current source file (that is the file that contains the #include
directive). If it is not found there, it is searched for in
the directories contained in the ULP directory path.
Portability note
If filename contains a directory path, it is best to always use the
forward slash as directory separator (even under Windows!). Windows drive
letters should be avoided. This way a User Language Program will run on all
platforms.
#require
Over time it may happen that newer versions of EAGLE implement new or modified
User Language features, which can cause error messages when such a ULP is run
from an older version of EAGLE. In order to give the user a dedicated message
that this ULP requires at least a certain version of EAGLE, a ULP can contain
the #require directive. The syntax is
#require version
The version must be given as a real constant
of the form
V.RRrr
where V is the version number, RR is the release number
and rr is the (optional) revision number (both padded with leading
zeros if they are less than 10). For example, if a ULP
requires at least EAGLE version 4.11r06 (which is the beta version that first
implemented the #require directive), it could use
#require 4.1106
The proper directive for version 5.1.2 would be
#require 5.0102
#usage
Every User Language Program should contain information about its function, how
to use it and maybe who wrote it.
The directive
#usage text [, text...]
implements a standard way to make this information available.
Example
#usage "en: A sample ULP\n"
"Implements an example that shows how to use the EAGLE User Language\n"
"Usage: RUN sample.ulp\n"
"Author: john@home.org",
"de: Beispiel eines ULPs\n"
"Implementiert ein Beispiel das zeigt, wie man die EAGLE User Language benutzt\n"
"Aufruf: RUN sample.ulp\n"
"Author: john@home.org"
Keywords
The following keywords are reserved for special purposes
and must not be used as normal identifier names:
break
case
char
continue
default
do
else
enum
for
if
int
numeric
real
return
string
switch
void
while
In addition, the names of
builtins and
object types
are also reserved and must not be used as identifier names.
Identifiers
An identifier is a name that is used to introduce a user defined
constant,
variable or
function.
int Number, number;
would define two different integer variables.
Constants
Constants are literal data items written into a User Language Program.
According to the different data types,
there are also different types of constants.
Character Constants
A character constant consists of a single character or
an escape sequence enclosed in
single quotes, like
'a'
'='
'\n'
The type of a character constant is
char.
Integer Constants
Depending on the first (and possibly the second) character, an
integer constant is assumed to be expressed in different
base values:
first second constant interpreted as 0 1-7 octal (base 8) 0 x,X hexadecimal (base 16) 1-9 decimal (base 10) Examples
16 decimal 020 octal 0x10 hexadecimal Real Constants
A real constant follows the general pattern
[-]int.frac[e|E[±]exp]
which stands for
You can omit either the decimal integer or the decimal fraction
(but not both). You can omit either the decimal point or the
letter e or E and the signed integer exponent
(but not both).
Examples
Constant Value 23.45e6 23.45 x 10^6 .0 0.0 0. 0.0 1. 1.0 -1.23 -1.23 2e-5 2.0 x 10^-5 3E+10 3.0 x 10^10 .09E34 0.09 x 10^34 String Constants
A string constant consists of a sequence of characters or
escape sequences enclosed in
double quotes, like
"Hello world\n"
The type of a string constant is
string.
string s = "Hello" " world\n";
It is also possible to extend a string constant over more than one line
by escaping the newline character with a backslash (\):
string s = "Hello \
world\n";
Escape Sequences
An escape sequence consists of a backslash (\), followed
by one or more special characters:
Sequence Value \a audible bell \b backspace \f form feed \n new line \r carriage return \t horizontal tab \v vertical tab \\ backslash \' single quote \" double quote \O O = up to 3 octal digits \xH H = up to 2 hex digits Examples
'\n'
"A tab\tinside a text\n"
"Ring the bell\a\n"
Punctuators
The punctuators used in a User Language Program are
[] Brackets () Parentheses {} Braces , Comma ; Semicolon : Colon = Equal sign Brackets
Brackets are used in array definitions
int ai[];
in array subscripts
n = ai[2];
and in string subscripts to access the individual characters of a string
string s = "Hello world";
char c = s[2];
Parentheses
Parentheses group expressions
(possibly altering normal
operator precedence), isolate conditional
expressions, and indicate
function calls and function parameters:
d = c * (a + b);
if (d == z) ++x;
func();
void func2(int n) { ... }
Braces
Braces indicate the start and end of a compound statement:
if (d == z) {
++x;
func();
}
and are also used to group the values of an array initializer:
int ai[] = { 1, 2, 3 };
Comma
The comma separates the elements of a function argument list
or the parameters of a function call:
int func(int n, real r, string s) { ... }
int i = func(1, 3.14, "abc");
It also delimits the values of an array initializer:
int ai[] = { 1, 2, 3 };
and it separates the elements of a variable definition:
int i, j, k;
Semicolon
The semicolon terminates a statement,
as in
i = a + b;
and it also delimits the init, test and increment expressions of a
for statement:
for (int n = 0; n < 3; ++n) {
func(n);
}
Colon
The colon indicates the end of a label in a
switch statement:
switch (c) {
case 'a': printf("It was an 'a'\n"); break;
case 'b': printf("It was a 'b'\n"); break;
default: printf("none of them\n");
}
Equal Sign
The equal sign separates variable definitions from initialization
lists:
int i = 10;
char c[] = { 'a', 'b', 'c' };
It is also used as an assignment operator.
Data Types
A User Language Program can define variables of different types, representing
the different kinds of information available in the EAGLE data structures.
char for single characters int for integral values real for floating point values string for textual information char
The data type char is used to store single characters, like the
letters of the alphabet, or small unsigned numbers.
int
The data type int is used to store signed integral values, like the
coordinates of an object.
real
The data type real is used to store signed floating point values, like
the grid distance.
string
The data type string is used to store textual information,
like the name of a part or net.
string s = "Layout";
printf("Third char is: %c\n", s[2]);
This would print the character 'y'. Note that s[2] returns
the third character of s!
string s = "Layout";
char c = s[2];
Implementation details
The data type string is actually implemented like native C-type
zero terminated strings. Looking at the following variable definition
string s = "abcde";
s[4] is the character 'e', and s[5] is the character
'\0', or the integer value 0x00.
This fact may be used to determine the end of a string without using the
strlen() function, as in
for (int i = 0; s[i]; ++i) {
// do something with s[i]
}
It is also perfectly ok to "cut off" part of a string by "punching" a zero
character into it:
string s = "abcde";
s[3] = 0;
This will result in s having the value "abc".
Note that everything following the zero character will actually be gone,
and it won't come back by restoring the original character. The same applies
to any other operation that sets a character to 0, for instance --s[3].
Type Conversions
The result type of an arithmetic
expression, such as a + b,
where a and b are different arithmetic types,
is equal to the "larger" of the two operand types.
Typecast
The result type of an arithmetic expression
can be explicitly converted to a different arithmetic type by applying a
typecast to it.
type(expression)
where type is one of
char,
int or
real,
and expression is any arithmetic
expression.
Object Types
The EAGLE data structures are stored in XML files:
These data files contain a hierarchy of objects.
In a User Language Program you can access these hierarchies through their
respective builtin access statements:
library(L) { ... }
schematic(S) { ... }
board(B) { ... }
These access statements set up a context within which you can access all of the
objects contained in the library, schematic or board.
Data members immediately return the requested data from an object.
For example, in
board(B) {
printf("%s\n", B.name);
}
the data member name of the board object B returns
the board's name.
Data members can also return other objects, as in
board(B) {
printf("%f\n", B.grid.size);
}
where the board's grid data member returns a grid object,
of which the size data member then returns the grid's size.
board(B) {
B.elements(E) {
printf("%-8s %-8s\n", E.name, E.value);
}
}
This example uses the board's elements() loop member function
to set up a loop through all of the board's elements. The block following
the B.elements(E) statement is executed in turn for each element,
and the current element can be referenced inside the block through the name
E.
board(MyBoard) {
MyBoard.elements(TheCurrentElement) {
printf("%-8s %-8s\n", TheCurrentElement.name, TheCurrentElement.value);
}
}
and would do the exact same thing. The scope of the variable created by a
loop member function is limited to the statement (or block) immediately
following the loop function call.
Object hierarchy of a Library:
LIBRARY
GRID
LAYER
DEVICESET
DEVICE
GATE
PACKAGE
CONTACT
PAD
SMD
CIRCLE
HOLE
RECTANGLE
FRAME
DIMENSION
TEXT
WIRE
POLYGON
WIRE
SYMBOL
PIN
CIRCLE
RECTANGLE
FRAME
DIMENSION
TEXT
WIRE
POLYGON
WIRE
Object hierarchy of a Schematic:
SCHEMATIC
GRID
LAYER
LIBRARY
ATTRIBUTE
VARIANTDEF
PART
ATTRIBUTE
VARIANT
SHEET
CIRCLE
RECTANGLE
FRAME
DIMENSION
TEXT
WIRE
POLYGON
WIRE
INSTANCE
ATTRIBUTE
MODULEINST
BUS
SEGMENT
LABEL
TEXT
WIRE
WIRE
NET
SEGMENT
JUNCTION
PINREF
PORTREF
TEXT
WIRE
MODULE
PORT
PART
SHEET
(same as above)
Change note from version 5 to version 6, compatibility
For compatibility reasons the access by the according member functions is further supported,
but the behaviour of the Object Functions reflects the new hierarchy.
Object hierarchy of a Board:
BOARD
GRID
LAYER
LIBRARY
ATTRIBUTE
VARIANTDEF
CIRCLE
HOLE
RECTANGLE
FRAME
DIMENSION
TEXT
WIRE
POLYGON
WIRE
ELEMENT
ATTRIBUTE
VARIANT
SIGNAL
CONTACTREF
POLYGON
WIRE
VIA
WIRE
UL_ARC
See also UL_WIRE
Constants
CAP_FLAT flat arc ends CAP_ROUND round arc ends Note
Start and end angles are defined mathematically positive (i.e. counterclockwise),
with angle1 < angle2.
In order to assure this condition, the start and end point of an UL_ARC may be exchanged
with respect to the UL_WIRE the arc has been derived from.
Example
board(B) {
B.wires(W) {
if (W.arc)
printf("Arc: (%f %f), (%f %f), (%f %f)\n",
u2mm(W.arc.x1), u2mm(W.arc.y1), u2mm(W.arc.x2), u2mm(W.arc.y2), u2mm(W.arc.xc), u2mm(W.arc.yc));
}
}
UL_AREA
See also UL_BOARD,
UL_DEVICE,
UL_PACKAGE,
UL_SHEET,
UL_SYMBOL
Example
board(B) {
printf("Area: (%f %f), (%f %f)\n",
u2mm(B.area.x1), u2mm(B.area.y1), u2mm(B.area.x2), u2mm(B.area.y2));
}
UL_ATTRIBUTE
See also UL_DEVICE,
UL_PART,
UL_INSTANCE,
UL_ELEMENT
Constants
ATTRIBUTE_DISPLAY_FLAG_OFF nothing is displayed ATTRIBUTE_DISPLAY_FLAG_VALUE value is displayed ATTRIBUTE_DISPLAY_FLAG_NAME name is displayed Note
display contains a bitwise or'ed value consisting of ATTRIBUTE_DISPLAY_FLAG_...
and defines which parts of the attribute are actually drawn.
This value is only valid if display is used in a UL_INSTANCE or UL_ELEMENT
context.
Example
schematic(SCH) {
SCH.parts(P) {
P.attributes(A) {
printf("%s = %s\n", A.name, A.value);
}
}
}
schematic(SCH) {
SCH.attributes(A) { // global attributes
printf("%s = %s\n", A.name, A.value);
}
}
UL_BOARD
See also UL_LIBRARY,
UL_SCHEMATIC
alwaysvectorfont int (ALWAYS_VECTOR_FONT_..., see note) area UL_AREA checked int (see note) description string grid UL_GRID headline string name string (see note) verticaltext int (VERTICAL_TEXT_...)
attributes() UL_ATTRIBUTE (see note) circles() UL_CIRCLE classes() UL_CLASS dimensions() UL_DIMENSION elements() UL_ELEMENT errors() UL_ERROR frames() UL_FRAME holes() UL_HOLE layers() UL_LAYER libraries() UL_LIBRARY polygons() UL_POLYGON rectangles() UL_RECTANGLE signals() UL_SIGNAL texts() UL_TEXT variantdefs() UL_VARIANTDEF wires() UL_WIRE Constants
ALWAYS_VECTOR_FONT_GUI alwaysvectorfont is set in the
user interface dialog ALWAYS_VECTOR_FONT_PERSISTENT alwaysvectorfont is set persistent in this board
VERTICAL_TEXT_UP reading direction for vertical texts: up VERTICAL_TEXT_DOWN reading direction for vertical texts: down Note
The value returned by alwaysvectorfont can be used in boolean context
or can be masked with the ALWAYS_VECTOR_FONT_... constants to determine
the source of this setting, as in
if (B.alwaysvectorfont) {
// alwaysvectorfont is set in general
}
if (B.alwaysvectorfont & ALWAYS_VECTOR_FONT_GUI) {
// alwaysvectorfont is set in the user interface
}
The value returned by checked can be used in boolean context and is
set only after a recent 'Design Rule Check' (DRC).
Example
board(B) {
B.elements(E) printf("Element: %s\n", E.name);
B.signals(S) printf("Signal: %s\n", S.name);
}
UL_BUS
See also UL_SHEET
name string (BUS_NAME_LENGTH)
segments() UL_SEGMENT Constants
BUS_NAME_LENGTH max. length of a bus name (obsolete - as from version 4 bus names can have any length) Example
schematic(SCH) {
SCH.sheets(SH) {
SH.busses(B) printf("Bus: %s\n", B.name);
}
}
UL_CIRCLE
See also UL_BOARD,
UL_PACKAGE,
UL_SHEET,
UL_SYMBOL
Example
board(B) {
B.circles(C) {
printf("Circle: (%f %f), r=%d, w=%d\n",
u2mm(C.x), u2mm(C.y), u2mm(C.radius), u2mm(C.width));
}
}
UL_CLASS
See also Design Rules,
UL_NET,
UL_SIGNAL,
UL_SCHEMATIC,
UL_BOARD
Note
The clearance member returns the clearance value between this net class
and the net class with the given number. If the number (and the square brackets) is
ommitted, the net class's own clearance value is returned. If a number is given,
it must be between 0 and the number of this net class.
Example
board(B) {
B.signals(S) {
printf("%-10s %d %s\n", S.name, S.class.number, S.class.name);
}
}
UL_CONTACT
See also UL_PACKAGE,
UL_PAD,
UL_SMD,
UL_CONTACTREF,
UL_PINREF
Constants
CONTACT_NAME_LENGTH max. recommended length of a contact name (used in formatted output only) Note
The signal data member returns the signal this contact is connected to
(only available in a board context).
Example
library(L) {
L.packages(PAC) {
PAC.contacts(C) {
printf("Contact: '%s', (%f %f)\n",
C.name, u2mm(C.x), u2mm(C.y));
}
}
}
UL_CONTACTREF
See also UL_SIGNAL,
UL_PINREF
contact UL_CONTACT element UL_ELEMENT route int (CONTACT_ROUTE_...) routetag string (see note) Constants
CONTACT_ROUTE_ALL must explicitly route to all contacts CONTACT_ROUTE_ANY may route to any contact Note
If route has the value CONTACT_ROUTE_ANY, the routetag
data member returns an additional tag which describes a group of contactrefs
belonging to the same pin.
Example
board(B) {
B.signals(S) {
printf("Signal '%s'\n", S.name);
S.contactrefs(C) {
printf("\t%s, %s\n", C.element.name, C.contact.name);
}
}
}
UL_DEVICE
See also UL_DEVICESET,
UL_LIBRARY,
UL_PART
activetechnology string (see note) area UL_AREA description string headline string library string name string (DEVICE_NAME_LENGTH) package UL_PACKAGE (see note) prefix string (DEVICE_PREFIX_LENGTH) technologies string (see note) value string ("On" or "Off")
attributes() UL_ATTRIBUTE (see note) gates() UL_GATE Constants
DEVICE_NAME_LENGTH max. recommended length of a device name (used in formatted output only) DEVICE_PREFIX_LENGTH max. recommended length of a device prefix (used in formatted output only) Note
The value returned by the activetechnology member depends on the context in which it is called:
Examples
library(L) {
L.devicesets(S) {
S.devices(D) {
if (D.package)
printf("Device: %s, Package: %s\n", D.name, D.package.name);
D.gates(G) {
printf("\t%s\n", G.name);
}
}
}
}
library(L) {
L.devicesets(DS) {
DS.devices(D) {
string t[];
int n = strsplit(t, D.technologies, ' ');
for (int i = 0; i < n; i++) {
D.attributes(A, t[i]) {
printf("%s = %s\n", A.name, A.value);
}
}
}
}
}
UL_DEVICESET
See also UL_DEVICE,
UL_LIBRARY,
UL_PART
Constants
DEVICE_NAME_LENGTH max. recommended length of a device name (used in formatted output only) DEVICE_PREFIX_LENGTH max. recommended length of a device prefix (used in formatted output only) Note
If a deviceset is currently edited in a library editor window,
the activedevice member returns the active device, selected by a PACKAGE
command. It can be used as a boolean function to check the availability of such an activedevice
(see example below).
Example
library(L) {
L.devicesets(D) {
printf("Device set: %s, Description: %s\n", D.name, D.description);
D.gates(G) {
printf("\t%s\n", G.name);
}
}
}
if (deviceset)
deviceset(DS) {
if (DS.activedevice)
printf("Active Device: %s\n", DS.activedevice.name);
}
UL_DIMENSION
See also UL_BOARD,
UL_GRID,
UL_PACKAGE,
UL_SHEET,
UL_SYMBOL
dtype int (DIMENSION_...) layer int extlength int extoffset int extwidth int precision int ratio int size int unit int (GRID_UNIT_...) visible int (unit, 0=off, 1=on) width int x1, y1 int (first reference point) x2, y2 int (second reference point) x3, y3 int (alignment reference point)
texts() UL_TEXT wires() UL_WIRE Constants
DIMENSION_PARALLEL linear dimension with parallel measurement line DIMENSION_HORIZONTAL linear dimension with horizontal measurement line DIMENSION_VERTICAL linear dimension with vertical measurement line DIMENSION_RADIUS radial dimension DIMENSION_DIAMETER diameter dimension DIMENSION_ANGLE angle dimension DIMENSION_LEADER an arbitrary pointer Note
The texts() and wires() loop members loop through all the
texts and wires the dimension consists of.
Example
board(B) {
B.dimensions(D) {
printf("Dimension: (%f %f), (%f %f), (%f %f)\n",
u2mm(D.x1), u2mm(D.y1), u2mm(D.x2), u2mm(D.y2), u2mm(D.x3), u2mm(D.y3));
}
}
UL_ELEMENT
See also UL_BOARD,
UL_CONTACTREF
angle real (0.0...359.9) attribute[] string (see note) column string (see note) locked int mirror int name string (ELEMENT_NAME_LENGTH) package UL_PACKAGE populate int (0=do not populate, 1=populate) row string (see note) smashed int (see note) spin int value string (ELEMENT_VALUE_LENGTH) x, y int (origin point)
attributes() UL_ATTRIBUTE texts() UL_TEXT (see note) Constants
ELEMENT_NAME_LENGTH max. recommended length of an element name (used in formatted output only) ELEMENT_VALUE_LENGTH max. recommended length of an element value (used in formatted output only) Note
The attribute[] member can be used to query a UL_ELEMENT for the value of a given
attribute (see the second example below). The returned string is empty if there is no
attribute by the given name, or if this attribute is explicitly empty.
Examples
board(B) {
B.elements(E) {
printf("Element: %s, (%f %f), Package=%s\n",
E.name, u2mm(E.x), u2mm(E.y), E.package.name);
}
}
board(B) {
B.elements(E) {
if (E.attribute["REMARK"])
printf("%s: %s\n", E.name, E.attribute["REMARK"]);
}
}
UL_ERROR
See also UL_BOARD,
UL_SCHEMATIC
area UL_AREA area2 UL_AREA (see note) code int (identification number) description string layer int modulename string s1 string (see note) s2 string s3 string s4 string s5 string s6 string sheet int (sheet number) signature string (signature string) state int (ERROR_STATE_...) type int (ERROR_TYPE_...) x, y int (center point)
contours() UL_WIRE (see note) Constants
ERROR_STATE_ACTIVE error has not yet been approved or processed ERROR_STATE_APPROVED error has been approved ERROR_STATE_PROCESSED error has been processed ERROR_TYPE_NONE no error ERROR_TYPE_WARNING warning ERROR_TYPE_ERROR error ERROR_TYPE_CONSISTENCY consistency error Note
A UL_ERROR is an abstract object which gives informations about ERC/DRC errors.
Example
string s1;
string ErrLst[];
int ErrCnt = 0;
string ErrLstHeader;
if (board) board(B) {
ErrLstHeader = "Code\tState\tDescription\tLayer\tSignature";
if (B.checked) {
B.errors(ER) {
if (ER.state == ERROR_STATE_ACTIVE) {
sprintf(s1, "%d\t%d\t%s\t%d\t%s", ER.code, ER.state, ER.description, ER.layer, ER.signature);
ErrLst[ErrCnt++] = s1;
}
}
}
}
if (schematic) schematic(SCH) {
ErrLstHeader = "Code\tState\tDescription\tSheet\tModule\ts1\ts2\ts3\ts4\ts5\ts6";
if (SCH.checked) {
SCH.errors(ER) {
if (ER.state == ERROR_STATE_ACTIVE) {
sprintf(s1, "%d\t%d\t%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s", ER.code, ER.state, ER.description, ER.sheet, ER.modulename, ER.s1, ER.s2, ER.s3, ER.s4, ER.s5, ER.s6);
ErrLst[ErrCnt++] = s1;
}
}
}
}
dlgDialog("Errors") {
int sel = -1;
dlgListView(ErrLstHeader, ErrLst, sel);
dlgPushButton("+OK") dlgAccept();
};
UL_FRAME
See also UL_BOARD,
UL_PACKAGE,
UL_SHEET,
UL_SYMBOL
Constants
FRAME_BORDER_BOTTOM bottom border is drawn FRAME_BORDER_RIGHT right border is drawn FRAME_BORDER_TOP top border is drawn FRAME_BORDER_LEFT left border is drawn Note
border contains a bitwise or'ed value consisting of FRAME_BORDER_...
and defines which of the four borders are actually drawn.
Example
board(B) {
B.frames(F) {
printf("Frame: (%f %f), (%f %f)\n",
u2mm(F.x1), u2mm(F.y1), u2mm(F.x2), u2mm(F.y2));
}
}
UL_GATE
See also UL_DEVICE
Constants
GATE_ADDLEVEL_MUST must GATE_ADDLEVEL_CAN can GATE_ADDLEVEL_NEXT next GATE_ADDLEVEL_REQUEST request GATE_ADDLEVEL_ALWAYS always
GATE_NAME_LENGTH max. recommended length of a gate name (used in formatted output only) Note
The coordinates of the origin point (x, y) are always those of the gate's position within
the device, even if the UL_GATE has been derived from a UL_INSTANCE.
Example
library(L) {
L.devices(D) {
printf("Device: %s, Package: %s\n", D.name, D.package.name);
D.gates(G) {
printf("\t%s, swaplevel=%d, symbol=%s\n",
G.name, G.swaplevel, G.symbol.name);
}
}
}
UL_GRID
See also UL_BOARD,
UL_LIBRARY,
UL_SCHEMATIC,
Unit Conversions
Constants
GRID_UNIT_MIC microns GRID_UNIT_MM millimeter GRID_UNIT_MIL mil GRID_UNIT_INCH inch Note
unitdist returns the grid unit that was set to define the actual grid size
(returned by distance), while unit returns the grid unit that is
used to display values or interpret user input.
Example
board(B) {
printf("Gridsize=%f\n", B.grid.distance);
}
UL_HOLE
See also UL_BOARD,
UL_PACKAGE
Note
diameter[] is only defined vor layers LAYER_TSTOP and LAYER_BSTOP
and returns the diameter of the solder stop mask in the given layer.
Example
board(B) {
B.holes(H) {
printf("Hole: (%f %f), drill=%f\n",
u2mm(H.x), u2mm(H.y), u2mm(H.drill));
}
}
UL_INSTANCE
See also UL_PINREF
angle real (0, 90, 180 and 270) column string (see note) gate UL_GATE mirror int name string (INSTANCE_NAME_LENGTH) part UL_PART row string (see note) sheet int (0=unused, >0=sheet number) smashed int (see note) value string (PART_VALUE_LENGTH) x, y int (origin point)
attributes() UL_ATTRIBUTE (see note) texts() UL_TEXT (see note) xrefs() UL_GATE (see note) Constants
INSTANCE_NAME_LENGTH max. recommended length of an instance name (used in formatted output only) PART_VALUE_LENGTH max. recommended length of a part value (instances do not have a value of their own!) Note
The attributes() member only loops through those attributes that have been
explicitly assigned to this instance (including smashed attributes).
Example
schematic(S) {
S.parts(P) {
printf("Part: %s\n", P.name);
P.instances(I) {
if (I.sheet != 0)
printf("\t%s used on sheet %d\n", I.name, I.sheet);
}
}
}
UL_JUNCTION
See also UL_SEGMENT
Example
schematic(SCH) {
SCH.sheets(SH) {
SH.nets(N) {
N.segments(SEG) {
SEG.junctions(J) {
printf("Junction: (%f %f)\n", u2mm(J.x), u2mm(J.y));
}
}
}
}
}
UL_LABEL
See also UL_SEGMENT
Note
If xref returns a non-zero value, the wires() loop member loops through
the wires that form the flag of a cross-reference label. Otherwise it is an empty loop.
Example
sheet(SH) {
SH.nets(N) {
N.segments(S) {
S.labels(L) {
printf("Label: (%f %f) '%s'", u2mm(L.x), u2mm(L.y), L.text.value);
}
}
}
}
UL_LAYER
See also UL_BOARD,
UL_LIBRARY,
UL_SCHEMATIC
Constants
LAYER_NAME_LENGTH max. recommended length of a layer name (used in formatted output only) LAYER_TOP layer numbers LAYER_BOTTOM LAYER_PADS LAYER_VIAS LAYER_UNROUTED LAYER_DIMENSION LAYER_TPLACE LAYER_BPLACE LAYER_TORIGINS LAYER_BORIGINS LAYER_TNAMES LAYER_BNAMES LAYER_TVALUES LAYER_BVALUES LAYER_TSTOP LAYER_BSTOP LAYER_TCREAM LAYER_BCREAM LAYER_TFINISH LAYER_BFINISH LAYER_TGLUE LAYER_BGLUE LAYER_TTEST LAYER_BTEST LAYER_TKEEPOUT LAYER_BKEEPOUT LAYER_TRESTRICT LAYER_BRESTRICT LAYER_VRESTRICT LAYER_DRILLS LAYER_HOLES LAYER_MILLING LAYER_MEASURES LAYER_DOCUMENT LAYER_REFERENCE LAYER_TDOCU LAYER_BDOCU LAYER_NETS LAYER_BUSSES LAYER_PINS LAYER_SYMBOLS LAYER_NAMES LAYER_VALUES LAYER_INFO LAYER_GUIDE LAYER_USER lowest number for user defined layers (100) Example
board(B) {
B.layers(L) printf("Layer %3d %s\n", L.number, L.name);
}
UL_LIBRARY
See also UL_BOARD,
UL_SCHEMATIC
description string (see note) grid UL_GRID headline string name string (LIBRARY_NAME_LENGTH, see note)
devices() UL_DEVICE devicesets() UL_DEVICESET layers() UL_LAYER packages() UL_PACKAGE symbols() UL_SYMBOL Constants
LIBRARY_NAME_LENGTH max. recommended length of a library name (used in formatted output only) Note
The description member returns the complete descriptive text as defined with
the DESCRIPTION command, while the headline
member returns only the first line of the description, without any HTML tags.
When using the description text keep in mind that it may contain newline characters ('\n').
The description and headline information is only available within a
library drawing, not if the library is derived form a UL_BOARD or UL_SCHEMATIC context.
Example
library(L) {
L.devices(D) printf("Dev: %s\n", D.name);
L.devicesets(D) printf("Dev: %s\n", D.name);
L.packages(P) printf("Pac: %s\n", P.name);
L.symbols(S) printf("Sym: %s\n", S.name);
}
schematic(S) {
S.libraries(L) printf("Library: %s\n", L.name);
}
UL_MODULE
See also UL_PORT,
UL_SCHEMATIC
Example
schematic(SCH) {
SCH.modules(M) {
M.parts(P) printf("Part: %s\n", P.name);
}
}
UL_MODULEINST
See also UL_PORTREF,
UL_VARIANTDEF
angle real (0, 90, 180 and 270) column string (see note) mirror int module UL_MODULE modulevariant string (selected variantdef of module) name string (INSTANCE_NAME_LENGTH) offset int row string (see note) sheet int (sheet number) smashed int (see note) x, y int (origin point)
texts() UL_TEXT (see note) wires() UL_WIRE Constants
INSTANCE_NAME_LENGTH max. recommended length of an instance name (used in formatted output only) Note
The texts() member loops through all texts of the module instance, no matter if
smashed or not.
Example
schematic(SCH) {
SCH.sheets(SH) {
SH.moduleinsts(MI) {
printf("Module instance %s is located on sheet %d\n", MI.name, MI.sheet);
}
}
}
UL_NET
See also UL_SHEET,
UL_SCHEMATIC
class UL_CLASS column string (see note) name string (NET_NAME_LENGTH) row string (see note)
portrefs() UL_PORTREF pinrefs() UL_PINREF (see note) segments() UL_SEGMENT (see note) Constants
NET_NAME_LENGTH max. recommended length of a net name (used in formatted output only) Note
The pinrefs() loop member can only be used if the net is in a
schematic context.
The segments() loop member can only be used if the net is in a
sheet context.
Example
schematic(S) {
S.nets(N) {
printf("Net: %s\n", N.name);
// N.segments(SEG) will NOT work here!
}
// or with virt. nets:
S.allnets(N) {
printf("Net: %s\n", N.name);
}
}
schematic(S) {
S.sheets(SH) {
SH.nets(N) {
printf("Net: %s\n", N.name);
N.segments(SEG) {
SEG.wires(W) {
printf("\tWire: (%f %f) (%f %f)\n",
u2mm(W.x1), u2mm(W.y1), u2mm(W.x2), u2mm(W.y2));
}
}
}
}
}
UL_PACKAGE
See also UL_DEVICE,
UL_ELEMENT,
UL_LIBRARY
area UL_AREA description string headline string library string name string (PACKAGE_NAME_LENGTH)
circles() UL_CIRCLE contacts() UL_CONTACT dimensions() UL_DIMENSION frames() UL_FRAME holes() UL_HOLE polygons() UL_POLYGON (see note) rectangles() UL_RECTANGLE texts() UL_TEXT (see note) wires() UL_WIRE (see note) Constants
PACKAGE_NAME_LENGTH max. recommended length of a package name (used in formatted output only) Note
The description member returns the complete descriptive text as defined with
the DESCRIPTION command, while the headline
member returns only the first line of the description, without any HTML tags.
When using the description text keep in mind that it may contain newline characters ('\n').
Example
library(L) {
L.packages(PAC) {
printf("Package: %s\n", PAC.name);
PAC.contacts(C) {
if (C.pad)
printf("\tPad: %s, (%f %f)\n",
C.name, u2mm(C.pad.x), u2mm(C.pad.y));
else if (C.smd)
printf("\tSmd: %s, (%f %f)\n",
C.name, u2mm(C.smd.x), u2mm(C.smd.y));
}
}
}
board(B) {
B.elements(E) {
printf("Element: %s, Package: %s\n", E.name, E.package.name);
}
}
UL_PAD
See also UL_PACKAGE,
UL_CONTACT,
UL_SMD
Constants
PAD_FLAG_STOP generate stop mask PAD_FLAG_THERMALS generate thermals PAD_FLAG_FIRST use special "first pad" shape
PAD_SHAPE_SQUARE square PAD_SHAPE_ROUND round PAD_SHAPE_OCTAGON octagon PAD_SHAPE_LONG long PAD_SHAPE_OFFSET offset
PAD_NAME_LENGTH max. recommended length of a pad name (same as CONTACT_NAME_LENGTH) Note
The parameters of the pad depend on the context in which it is accessed:
if (pad.flags & PAD_FLAG_STOP) {
...
}
Note that if your ULP just wants to draw the objects, you don't need to check these
flags explicitly. The diameter[] and shape[] members will return
the proper data; for instance, if PAD_FLAG_STOP is set, diameter[LAYER_TSTOP]
will return 0, which should result in nothing being drawn in that layer.
The flags member is mainly for ULPs that want to create script files that
create library objects.
Example
library(L) {
L.packages(PAC) {
PAC.contacts(C) {
if (C.pad)
printf("Pad: '%s', (%f %f), d=%f\n",
C.name, u2mm(C.pad.x), u2mm(C.pad.y), u2mm(C.pad.diameter[LAYER_BOTTOM]));
}
}
}
UL_PART
See also UL_SCHEMATIC,
UL_SHEET
attribute[] string (see note) device UL_DEVICE deviceset UL_DEVICESET module UL_MODULE (see note) modulepart UL_PART (see note) modulepath string (see note) name string (PART_NAME_LENGTH) populate int (0=do not populate, 1=populate) value string (PART_VALUE_LENGTH)
attributes() UL_ATTRIBUTE (see note) instances() UL_INSTANCE (see note) variants() UL_VARIANT (see note) Constants
PART_NAME_LENGTH max. recommended length of a part name (used in formatted output only) PART_VALUE_LENGTH max. recommended length of a part value (used in formatted output only) Note
The attribute[] member can be used to query a UL_PART for the value of a given
attribute (see the second example below). The returned string is empty if there is no
attribute by the given name, or if this attribute is explicitly empty.
For example, a virtual part with name 'MI1:R1' has modulepath 'MI1'.
'R101' coming from a module instance 'MX' with offset notation, delivers modulepath 'MX'.
'MAIN:SUB1:SUBSUB1:C5' has modulepath 'MAIN:SUB1:SUBSUB1'.
Examples
schematic(S) {
S.parts(P) printf("Part: %s\n", P.name);
}
schematic(S) {
S.allparts(P) {
if (P.attribute["REMARK"])
printf("%s: %s\n", P.name, P.attribute["REMARK"]);
if (P.modulepart) {
P.modulepart.instances(I)
printf("%s is a virtual part from %s in module %s with part instance on sheet %d\n",
P.name, P.modulepart.name, P.module.name, I.sheet);
}
else {
P.instances(I)
printf("%s is a part on main schematic with instance on sheet %d\n",
P.name, I.sheet);
}
}
}
schematic(S) {
S.allparts(P) {
if (P.modulepart) {
string miNames[];
int nr = strsplit(miNames, P.modulepath, ':');
if (nr == 1)
printf("%s is a virtual part created by module instance %s in main schematic.\n",
P.name, miNames[0]);
else {
printf("%s is a virtual part in a multiple hierarchy created by this path of module instances:\n", P.name);
for (int i = 0; i < nr; ++i)
printf("%s\n", miNames[i]);
}
}
}
}
UL_PIN
See also UL_SYMBOL,
UL_PINREF,
UL_CONTACTREF
angle real (0, 90, 180 and 270) contact UL_CONTACT (deprecated, see note) direction int (PIN_DIRECTION_...) function int (PIN_FUNCTION_FLAG_...) length int (PIN_LENGTH_...) name string (PIN_NAME_LENGTH) net string (see note) route int (CONTACT_ROUTE_...) swaplevel int visible int (PIN_VISIBLE_FLAG_...) x, y int (connection point)
circles() UL_CIRCLE contacts() UL_CONTACT (see note) texts() UL_TEXT wires() UL_WIRE Constants
PIN_DIRECTION_NC not connected PIN_DIRECTION_IN input PIN_DIRECTION_OUT output (totem-pole) PIN_DIRECTION_IO in/output (bidirectional) PIN_DIRECTION_OC open collector PIN_DIRECTION_PWR power input pin PIN_DIRECTION_PAS passive PIN_DIRECTION_HIZ high impedance output PIN_DIRECTION_SUP supply pin
PIN_FUNCTION_FLAG_NONE no symbol PIN_FUNCTION_FLAG_DOT inverter symbol PIN_FUNCTION_FLAG_CLK clock symbol
PIN_LENGTH_POINT no wire PIN_LENGTH_SHORT 0.1 inch wire PIN_LENGTH_MIDDLE 0.2 inch wire PIN_LENGTH_LONG 0.3 inch wire
PIN_NAME_LENGTH max. recommended length of a pin name (used in formatted output only)
PIN_VISIBLE_FLAG_OFF no name drawn PIN_VISIBLE_FLAG_PAD pad name drawn PIN_VISIBLE_FLAG_PIN pin name drawn
CONTACT_ROUTE_ALL must explicitly route to all contacts CONTACT_ROUTE_ANY may route to any contact Note
The contacts() loop member loops through the contacts
that have been assigned to the pin through a CONNECT
command. This is the case in a UL_DEVICE context or coming via UL_PINREF, but not
via UL_LIBRARY.symbols(). If this is not the case the list is empty.
The name data member always returns the name of the pin as it was defined
in the library, with any '@' character for pins with the same name left intact
(see the PIN command for details).
The texts loop member, on the other hand, returns the pin name (if it is
visible) in the same way as it is displayed in the current drawing type.
Example
library(L) {
L.symbols(S) {
printf("Symbol: %s\n", S.name);
S.pins(P) {
printf("\tPin: %s, (%f %f)", P.name, u2mm(P.x), u2mm(P.y));
if (P.direction == PIN_DIRECTION_IN)
printf(" input");
if ((P.function & PIN_FUNCTION_FLAG_DOT) != 0)
printf(" inverted");
printf("\n");
}
}
}
UL_PINREF
See also UL_SEGMENT,
UL_CONTACTREF
instance UL_INSTANCE part UL_PART pin UL_PIN Example
schematic(SCH) {
SCH.sheets(SH) {
printf("Sheet: %d\n", SH.number);
SH.nets(N) {
printf("\tNet: %s\n", N.name);
N.segments(SEG) {
SEG.pinrefs(P) {
printf("connected to: %s, %s, %s\n",
P.part.name, P.instance.name, P.pin.name);
}
}
}
}
}
UL_POLYGON
See also UL_BOARD,
UL_PACKAGE,
UL_SHEET,
UL_SIGNAL,
UL_SYMBOL
Constants
POLYGON_POUR_SOLID solid POLYGON_POUR_HATCH hatch POLYGON_POUR_CUTOUT cutout Note
The contours() and fillings() loop members loop through the
wires that are used to draw the calculated polygon if it is part of a signal and
the polygon has been calculated by the RATSNEST
command. The wires() loop member always loops through the polygon
wires as they were drawn by the user. For an uncalculated signal polygon
contours() does the same as wires(), and fillings()
does nothing.
Polygon width
When using the fillings() loop member to get the fill wires of a solid
polygon, make sure the width of the polygon is not zero (actually it should
be quite a bit larger than zero, for example at least the hardware resolution of
the output device you are going to draw on). Filling a polygon with zero width
may result in enormous amounts of data, since it will be calculated with the
smallest editor resolution of 1/320000mm!
Partial polygons
A calculated signal polygon may consist of several distinct parts (called
positive polygons), each of which can contain extrusions (negative
polygons) resulting from other objects being subtracted from the polygon.
Negative polygons can again contain other positive polygons and so on.
Example
board(B) {
B.signals(S) {
S.polygons(P) {
int x0, y0, first = 1;
P.contours(W) {
if (first) {
// a new partial polygon is starting
x0 = W.x1;
y0 = W.y1;
}
// ...
// do something with the wire
// ...
if (first)
first = 0;
else if (W.x2 == x0 && W.y2 == y0) {
// this was the last wire of the partial polygon,
// so the next wire (if any) will be the first wire
// of the next partial polygon
first = 1;
}
}
}
}
}
board(B) {
B.signals(S) {
S.polygons(P) {
// handle only the "positive" polygons:
int i = 1;
int active;
do {
active = 0;
P.contours(W, i) {
active = 1;
// do something with the wire
}
i++;
} while (active);
}
}
}
UL_PORT
See also UL_MODULE,
UL_MODULEINST,
UL_PORTREF
Constants
MODULE_BORDER_BOTTOM at bottom border of module MODULE_BORDER_RIGHT at right border of module MODULE_BORDER_TOP at top border of module MODULE_BORDER_LEFT at left border of module PORT_NAME_LENGTH max. recommended length of a port name (used in formatted output only) Note
The direction values are identical to the PIN_DIRECTION_... values (without PIN_DIRECTION_SUP).
Example
schematic(SCH) {
SCH.modules(M) {
M.ports(P) printf("Port: %s\n", P.name);
}
}
UL_PORTREF
See also UL_SEGMENT
moduleinst UL_MODULEINST port UL_PORT Example
schematic(SCH) {
SCH.sheets(SH) {
printf("Sheet: %d\n", SH.number);
SH.nets(N) {
printf("\tNet: %s\n", N.name);
N.segments(SEG) {
SEG.portrefs(P) {
printf("\tconnected to: %s, %s\n",
P.moduleinst.name, P.port.name);
}
}
}
}
}
UL_RECTANGLE
See also UL_BOARD,
UL_PACKAGE,
UL_SHEET,
UL_SYMBOL
Example
board(B) {
B.rectangles(R) {
printf("Rectangle: (%f %f), (%f %f)\n",
u2mm(R.x1), u2mm(R.y1), u2mm(R.x2), u2mm(R.y2));
}
}
UL_SCHEMATIC
See also UL_BOARD,
UL_LIBRARY
alwaysvectorfont int (ALWAYS_VECTOR_FONT_..., see note) checked int (see note) description string grid UL_GRID headline string name string (see note) verticaltext int (VERTICAL_TEXT_...) xreflabel string xrefpart string
allnets() UL_NET (see note) allparts() UL_PART (see note) attributes() UL_ATTRIBUTE (see note) classes() UL_CLASS errors() UL_ERROR layers() UL_LAYER libraries() UL_LIBRARY modules() UL_MODULE nets() UL_NET parts() UL_PART sheets() UL_SHEET variantdefs() UL_VARIANTDEF Constants
ALWAYS_VECTOR_FONT_GUI alwaysvectorfont is set in the
user interface dialog ALWAYS_VECTOR_FONT_PERSISTENT alwaysvectorfont is set persistent in this schematic
VERTICAL_TEXT_UP reading direction for vertical texts: up VERTICAL_TEXT_DOWN reading direction for vertical texts: down Note
The value returned by alwaysvectorfont can be used in boolean context
or can be masked with the ALWAYS_VECTOR_FONT_... constants to determine
the source of this setting, as in
if (sch.alwaysvectorfont) {
// alwaysvectorfont is set in general
}
if (sch.alwaysvectorfont & ALWAYS_VECTOR_FONT_GUI) {
// alwaysvectorfont is set in the user interface
}
The value returned by checked can be used in boolean context and is
set only after a recent 'Electrical Rule Check' (ERC).
Virtual nets, allnets() loop
The allnets() loop member loops through the nets() of the
schematic itself and through all the virtual nets, generated by module instances.
Virtual parts, allparts() loop
Hierarchical parts are generated by module instances and actually do not exist in the schematic,
only corresponding parts in the modules. For this we sometimes call them 'Virtual parts'.
One module part can be used by several virtual parts via several module instances.
As each virtual part corresponds to a (real existing) element in the board,
the User Language supplies those parts as well, e.g. for BOM generation.
The allparts() loop member loops through the parts() of the
schematic itself and through all the virtual parts.
Example
schematic(S) {
S.parts(P) printf("Part: %s\n", P.name);
}
UL_SEGMENT
See also UL_BUS,
UL_NET
junctions() UL_JUNCTION (see note) labels() UL_LABEL pinrefs() UL_PINREF (see note) portrefs() UL_PORTREF texts() UL_TEXT (deprecated, see note) wires() UL_WIRE Note
The junctions() and pinrefs() loop members are only available
for net segments.
Example
schematic(SCH) {
SCH.sheets(SH) {
printf("Sheet: %d\n", SH.number);
SH.nets(N) {
printf("\tNet: %s\n", N.name);
N.segments(SEG) {
SEG.pinrefs(P) {
printf("connected to: %s, %s, %s\n",
P.part.name, P.instance.name, P.pin.name);
}
}
}
}
}
UL_SHEET
See also UL_SCHEMATIC
area UL_AREA description string headline string number int
busses() UL_BUS circles() UL_CIRCLE dimensions() UL_DIMENSION frames() UL_FRAME instances() UL_INSTANCE moduleinsts() UL_MODULEINST nets() UL_NET polygons() UL_POLYGON rectangles() UL_RECTANGLE texts() UL_TEXT wires() UL_WIRE Example
schematic(SCH) {
SCH.sheets(S) {
printf("Sheet: %d\n", S.number);
}
}
UL_SIGNAL
See also UL_BOARD
airwireshidden int class UL_CLASS name string (SIGNAL_NAME_LENGTH)
contactrefs() UL_CONTACTREF polygons() UL_POLYGON vias() UL_VIA wires() UL_WIRE Constants
SIGNAL_NAME_LENGTH max. recommended length of a signal name (used in formatted output only) Example
board(B) {
B.signals(S) printf("Signal: %s\n", S.name);
}
UL_SMD
See also UL_PACKAGE,
UL_CONTACT,
UL_PAD
Constants
SMD_FLAG_STOP generate stop mask SMD_FLAG_THERMALS generate thermals SMD_FLAG_CREAM generate cream mask
SMD_NAME_LENGTH max. recommended length of an smd name (same as CONTACT_NAME_LENGTH) Note
The parameters of the smd depend on the context in which it is accessed:
If the dx and dy data members are called with an optional layer index,
the data for that layer is returned according to the Design Rules.
Valid layers are LAYER_TOP, LAYER_TSTOP and LAYER_TCREAM for an smd in the Top layer, and
LAYER_BOTTOM, LAYER_BSTOP and LAYER_BCREAM for an smd in the Bottom layer, respectively.
if (smd.flags & SMD_FLAG_STOP) {
...
}
Note that if your ULP just wants to draw the objects, you don't need to check these
flags explicitly. The dx[] and dy[] members will return
the proper data; for instance, if SMD_FLAG_STOP is set, dx[LAYER_TSTOP]
will return 0, which should result in nothing being drawn in that layer.
The flags member is mainly for ULPs that want to create script files that
create library objects.
Example
library(L) {
L.packages(PAC) {
PAC.contacts(C) {
if (C.smd)
printf("Smd: '%s', (%f %f), dx=%f, dy=%f\n",
C.name, u2mm(C.smd.x), u2mm(C.smd.y), u2mm(C.smd.dx), u2mm(C.smd.dy));
}
}
}
UL_SYMBOL
See also UL_GATE,
UL_LIBRARY
area UL_AREA description string headline string library string name string (SYMBOL_NAME_LENGTH)
circles() UL_CIRCLE dimensions() UL_DIMENSION frames() UL_FRAME rectangles() UL_RECTANGLE pins() UL_PIN polygons() UL_POLYGON texts() UL_TEXT (see note) wires() UL_WIRE Constants
SYMBOL_NAME_LENGTH max. recommended length of a symbol name (used in formatted output only) Note
If the UL_SYMBOL is derived from a UL_INSTANCE, the texts() member only loops through the
non-detached texts of that instance.
Example
library(L) {
L.symbols(S) printf("Sym: %s\n", S.name);
}
UL_TEXT
See also UL_BOARD,
UL_PACKAGE,
UL_SHEET,
UL_SYMBOL
Constants
FONT_VECTOR vector font FONT_PROPORTIONAL proportional font FONT_FIXED fixed font
ALIGN_BOTTOM_LEFT bottom/left aligned ALIGN_BOTTOM_CENTER bottom/center aligned ALIGN_BOTTOM_RIGHT bottom/right aligned ALIGN_CENTER_LEFT center/left aligned ALIGN_CENTER centered ALIGN_CENTER_RIGHT center/right aligned ALIGN_TOP_LEFT top/left aligned ALIGN_TOP_CENTER top/center aligned ALIGN_TOP_RIGHT top/right aligned Note
The wires() loop member always accesses the individual wires the text
is composed of when using the vector font, even if the actual font is not
FONT_VECTOR.
Example
board(B) {
B.texts(T) {
printf("Text: %s\n", T.value);
}
}
UL_VARIANTDEF
See also UL_VARIANT,
UL_SCHEMATIC,
UL_BOARD
name string Example
schematic(SCH) {
printf("Defined assembly variants:\n");
SCH.variantdefs(VD) {
printf("\t'%s'\n", VD.name);
}
printf("\n");
printf("Part\tVariantdef\tValue\tTechn.\tPopulated\n");
SCH.parts(P) {
printf("%s\t%s\t%s\t%s\t%s\n", P.name, "default", P.value, P.device.activetechnology, "yes");
P.variants(V) {
printf("%s\t%s\t%s\t%s\t%s\n", P.name, V.variantdef.name, V.value, V.technology, V.populate ? "yes" : "no");
}
}
}
UL_VARIANT
See also UL_VARIANTDEF,
UL_PART
populate int (0=do not populate, 1=populate) value string technology string variantdef UL_VARIANTDEF Example
schematic(SCH) {
printf("Defined assembly variants:\n");
SCH.variantdefs(VD) {
printf("\t'%s'\n", VD.name);
}
printf("\n");
printf("Part\tVariantdef\tValue\tTechn.\tPopulated\n");
SCH.parts(P) {
printf("%s\t%s\t%s\t%s\t%s\n", P.name, "default", P.value, P.device.activetechnology, "yes");
P.variants(V) {
printf("%s\t%s\t%s\t%s\t%s\n", P.name, V.variantdef.name, V.value, V.technology, V.populate ? "yes" : "no");
}
}
}
UL_VIA
See also UL_SIGNAL
Constants
VIA_FLAG_STOP always generate stop mask
VIA_SHAPE_SQUARE square VIA_SHAPE_ROUND round VIA_SHAPE_OCTAGON octagon Note
The diameter and shape of the via depend on the layer for which they shall be retrieved,
because they may be different in each layer depending on the Design Rules.
If one of the layers LAYER_TOP...LAYER_BOTTOM, LAYER_TSTOP or LAYER_BSTOP
is given as the index to the diameter or shape data member, the resulting value will be calculated
according to the Design Rules. If LAYER_VIAS is given, the raw value as defined in the via will
be returned.
Example
board(B) {
B.signals(S) {
S.vias(V) {
printf("Via: (%f %f)\n", u2mm(V.x), u2mm(V.y));
}
}
}
UL_WIRE
See also UL_BOARD,
UL_PACKAGE,
UL_SEGMENT,
UL_SHEET,
UL_SIGNAL,
UL_SYMBOL,
UL_ARC
Constants
CAP_FLAT flat arc ends CAP_ROUND round arc ends WIRE_STYLE_CONTINUOUS continuous WIRE_STYLE_LONGDASH long dash WIRE_STYLE_SHORTDASH short dash WIRE_STYLE_DASHDOT dash dot Wire Style
A UL_WIRE that has a style other than WIRE_STYLE_CONTINUOUS can use the
pieces() loop member to access the individual segments that constitute
for example a dashed wire. If pieces() is called for a UL_WIRE with
WIRE_STYLE_CONTINUOUS, a single segment will be accessible which is just
the same as the original UL_WIRE. The pieces() loop member can't be called
from a UL_WIRE that itself has been returned by a call to pieces() (this would
cause an infinite recursion).
Arcs at Wire level
Arcs are basically wires, with a few additional properties. At the first level
arcs are treated exactly the same as wires, meaning they have a start and an end point,
a width, layer and wire style. In addition to these an arc, at the wire level, has
a cap and a curve parameter. cap defines whether the arc endings
are round or flat, and curve defines the "curvature" of the arc. The valid
range for curve is -360..+360, and its value means what part of
a full circle the arc consists of. A value of 90, for instance, would
result in a 90° arc, while 180 would give you a semicircle.
The maximum value of 360 can only be reached theoretically, since this would
mean that the arc consists of a full circle, which, because the start and end points
have to lie on the circle, would have to have an infinitely large diameter.
Positive values for curve mean that the arc is drawn in a mathematically positive
sense (i.e. counterclockwise). If curve is 0, the arc is a straight
line ("no curvature"), which is actually a wire.
Example
board(B) {
B.wires(W) {
printf("Wire: (%f %f) (%f %f)\n",
u2mm(W.x1), u2mm(W.y1), u2mm(W.x2), u2mm(W.y2));
}
}
Definitions
The data items to be used in a User Language Program must be defined
before they can be used.
Constant Definitions
Constants are defined using the keyword enum, as in
enum { a, b, c };
which would define the three constants a, b and c,
giving them the values 0, 1 and 2, respectively.
enum { a, b = 5, c };
where a would be 0, b would be 5 and
c would be 6.
Variable Definitions
The general syntax of a variable definition is
[numeric] type identifier [= initializer][, ...];
where type is one of the
data or
object types,
identifier is the name of the variable, and initializer
is a optional initial value.
Examples
The members of array elements of object types can't be accessed directly:
int i; defines an int variable named i string s = "Hello"; defines a string variable named s and initializes it to "Hello" real a, b = 1.0, c; defines three real variables named a, b and c, initializing b to the value 1.0 int n[] = { 1, 2, 3 }; defines an array of int, initializing the first three elements to 1, 2 and 3 numeric string names[]; defines a string array that can be sorted alphanumerically UL_WIRE w; defines a UL_WIRE object named w
UL_SIGNAL signals[];
...
UL_SIGNAL s = signals[0];
printf("%s", s.name);
Function Definitions
You can write your own User Language functions and call them just like the
Builtin Functions.
type identifier(parameters)
{
statements
}
where type is one of the
data or
object types,
identifier is the name of the function,
parameters is a list of comma separated parameter definitions,
and statements is a sequence of statements.
The special function main()
If your User Language Program contains a function called
main(), that function will be explicitly called as the
main function, and it's return value will be the
return value of the program.
Example
int CountDots(string s)
{
int dots = 0;
for (int i = 0; s[i]; ++i)
if (s[i] == '.')
++dots;
return dots;
}
string dotted = "This.has.dots...";
output("test") {
printf("Number of dots: %d\n",
CountDots(dotted));
}
Operators
The following table lists all of the User Language operators, in order
of their precedence (Unary having the highest precedence,
Comma the lowest):
Unary ! ~ + - ++ -- Multiplicative * / % Additive + - Shift << >> Relational < <= > >= Equality == != Bitwise AND & Bitwise XOR ^ Bitwise OR | Logical AND && Logical OR || Conditional ?: Assignment = *= /= %= += -= &= ^= |= <<= >>= Comma , Bitwise Operators
Bitwise operators work only with data types
char and
int.
Unary ~ Bitwise (1's) complement Binary << Shift left >> Shift right & Bitwise AND ^ Bitwise XOR | Bitwise OR Assignment &= Assign bitwise AND ^= Assign bitwise XOR |= Assign bitwise OR <<= Assign left shift >>= Assign right shift Logical Operators
Logical operators work with expressions
of any data type.
Unary ! Logical NOT Binary && Logical AND || Logical OR Comparison Operators
Comparison operators work with expressions
of any data type,
except Object Types.
< Less than <= Less than or equal to > Greater than >= Greater than or equal to == Equal to != Not equal to Evaluation Operators
Evaluation operators are used to evaluate expressions
based on a condition, or to group a sequence of expressions and have them
evaluated as one expression.
?: Conditional , Comma
int a;
// ...code that calculates 'a'
string s = a ? "True" : "False";
which is basically the same as
int a;
string s;
// ...code that calculates 'a'
if (a)
s = "True";
else
s = "False";
but the advantage of the conditional operator is that it can be used in
an expression.
Arithmetic Operators
Arithmetic operators work with data types
char,
int and
real
(except for ++, --, % and %=).
Unary + Unary plus - Unary minus ++ Pre- or postincrement -- Pre- or postdecrement Binary * Multiply / Divide % Remainder (modulus) + Binary plus - Binary minus Assignment = Simple assignment *= Assign product /= Assign quotient %= Assign remainder (modulus) += Assign sum -= Assign difference String Operators
String operators work with data types
char,
int and
string.
The left operand must always be of type
string.
Binary + Concatenation Assignment = Simple assignment += Append to string Expressions
An expression can be one of the following:
Expressions can be grouped using parentheses,
and may be recursive, meaning that an expression can consist of
subexpressions.
Arithmetic Expression
An arithmetic expression is any combination of numeric
operands and an arithmetic operator or a
bitwise operator.
Examples
a + b
c++
m << 1
Assignment Expression
An assignment expression consists of a variable on the left
side of an assignment operator, and an
expression on the right side.
Examples
a = x + 42
b += c
s = "Hello"
String Expression
A string expression is any combination of
string and char
operands and a string operator.
Examples
s + ".brd"
t + 'x'
Comma Expression
A comma expression is a sequence of expressions, delimited by
the comma operator
Example
i++, j++, k++
Conditional Expression
A conditional expression uses the
conditional operator to make a decision
within an expression.
Example
int a;
// ...code that calculates 'a'
string s = a ? "True" : "False";
Function Call
A function call transfers the program flow to a
user defined function or a
builtin function.
The formal parameters defined in the
function definition are replaced
with the values of the expressions used as the actual arguments of the
function call.
Example
int p = strchr(s, 'b');
Statements
A statement can be one of the following:
Statements specify the flow of control as a User Language Program
executes. In absence of specific control statements, statements are
executed sequentially in the order of appearance in the ULP file.
Compound Statement
A compound statement (also known as block) is a list
(possibly empty) of statements enclosed in matching braces ({}).
Syntactically, a block can be considered to be a single statement, but it
also controls the scoping of identifiers. An
identifier declared within a block has a
scope starting at the point of declaration and ending at the closing
brace.
Expression Statement
An expression statement is any
expression followed by a
semicolon.
Control Statements
Control statements are used to control the program flow.
do...while
for
while
Selection statements are
if...else
switch
Jump statements are
break
continue
return
break
The break statement has the general syntax
break;
and immediately terminates the nearest enclosing
do...while,
for,
switch or
while
statement.
This also applies to loop members of object types.
continue
The continue statement has the general syntax
continue;
and immediately transfers control to the test condition of the
nearest enclosing
do...while,
while, or
for statement, or to the increment expression
of the nearest enclosing
for
statement.
do...while
The do...while statement has the general syntax
do statement while (condition);
and executes the statement until the condition
expression becomes zero.
Example
string s = "Trust no one!";
int i = -1;
do {
++i;
} while (s[i]);
for
The for statement has the general syntax
for ([init]; [test]; [inc]) statement
and performs the following steps:
If there is no
break or
return
inside the statement, the inc expression (or the
statement) must affect
the value of the test expression, or test itself must
change during evaluation in order to avoid an endless loop.
Example
string s = "Trust no one!";
int sum = 0;
for (int i = 0; s[i]; ++i)
sum += s[i]; // sums up the characters in s
if...else
The if...else statement has the general syntax
if (expression)
t_statement
[else
f_statement]
The conditional expression is evaluated, and if its value is nonzero
the t_statement is executed. Otherwise the f_statement is
executed in case there is an else clause.
if (a == 1) {
if (b == 1)
printf("a == 1 and b == 1\n");
}
else
printf("a != 1\n");
return
A function with a return type
other than void must contain at least one return
statement with the syntax
return expression;
where expression must evaluate to a type that is compatible with
the function's return type. The value of expression is the value
returned by the function.
switch
The switch statement has the general syntax
switch (sw_exp) {
case case_exp: case_statement
...
[default: def_statement]
}
and allows for the transfer of control to one of several
case-labeled statements, depending on the value of
sw_exp (which must be of integral type).
Example
string s = "Hello World";
int vowels = 0, others = 0;
for (int i = 0; s[i]; ++i)
switch (toupper(s[i])) {
case 'A':
case 'E':
case 'I':
case 'O':
case 'U': ++vowels;
break;
default: ++others;
}
printf("There are %d vowels in '%s'\n", vowels, s);
while
The while statement has the general syntax
while (condition) statement
and executes the statement as long as the condition
expression is not zero.
Example
string s = "Trust no one!";
int i = 0;
while (s[i])
++i;
Builtins
Builtins are Constants, Variables, Functions and Statements
that provide additional information and allow for data manipulations.
Builtin Constants
Builtin constants are used to provide information about
object parameters, such as maximum recommended name length, flags etc.
EAGLE_VERSION EAGLE program version number (int) EAGLE_RELEASE EAGLE program release number (int) EAGLE_SIGNATURE a string containing EAGLE program name, version and copyright information EAGLE_PATH a string containing the complete path of the EAGLE executable EAGLE_DIR a string containing the directory of the EAGLE installation ($EAGLEDIR) EAGLE_HOME a string containing the user's home directory when starting EAGLE ($HOME) eagle_epf a string containing the complete path of the currently used eagle.epf OS_SIGNATURE a string containing a signature of the operating system (e.g. Mac..., Windows... or Linux) REAL_EPSILON the minimum positive real number such that 1.0 + REAL_EPSILON != 1.0 REAL_MAX the largest possible real value REAL_MIN the smallest possible (positive!) real value
the smallest representable number is -REAL_MAXINT_MAX the largest possible int value INT_MIN the smallest possible int value PI the value of "pi" (3.14..., real) usage a string containing the text from the #usage directive
path_doc[] Documentation path_lbr[] Libraries path_dru[] Design Rules path_ulp[] User Language Programs path_scr[] Scripts path_cam[] CAM Jobs path_epf[] Projects
string s = path_lbr[0] + '/' + "mylib.lbr";
used_libraries[] Builtin Variables
Builtin variables are used to provide information at runtime.
int argc number of arguments given to the RUN command string argv[] arguments given to the RUN command (argv[0] is the full ULP file name) Builtin Functions
Builtin functions are used to perform specific tasks, like
printing formatted strings, sorting data arrays or the like.
Alphabetical reference of all builtin functions:
Character Functions
Character functions are used to manipulate single characters.
is...()
int isalpha(char c);
int iscntrl(char c);
int isdigit(char c);
int isgraph(char c);
int islower(char c);
int isprint(char c);
int ispunct(char c);
int isspace(char c);
int isupper(char c);
int isxdigit(char c);
Character categories
isalnum letters (A to Z or a to z) or digits (0 to 9) isalpha letters (A to Z or a to z) iscntrl delete characters or ordinary control characters (0x7F or 0x00 to 0x1F) isdigit digits (0 to 9) isgraph printing characters (except space) islower lowercase letters (a to z) isprint printing characters (0x20 to 0x7E) ispunct punctuation characters (iscntrl or isspace) isspace space, tab, carriage return, new line, vertical tab, or formfeed (0x09 to 0x0D, 0x20) isupper uppercase letters (A to Z) isxdigit hex digits (0 to 9, A to F, a to f) Example
char c = 'A';
if (isxdigit(c))
printf("%c is hex\n", c);
else
printf("%c is not hex\n", c);
to...()
See also strupr,
strlwr
char toupper(char c);
The toupper function returns the converted character if c
is lowercase. All other characters are returned unchanged.
File Handling Functions
Filename handling functions are used to work with file names,
sizes and timestamps.
fileerror()
See also output,
printf,
fileread
Example
fileerror();
output("file.txt", "wt") {
printf("Test\n");
}
if (fileerror())
exit(1);
fileglob()
See also dlgFileOpen(),
dlgFileSave()
Note for Windows users
The directory delimiter in the array is always a forward slash.
This makes sure User Language Programs will work platform independently.
In the pattern the backslash ('\') is also treated
as a directory delimiter.
Example
string a[];
int n = fileglob(a, "*.brd");
Filename Functions
See also Filedata Functions
string fileext(string file);
string filename(string file);
string filesetext(string file, string newext);
fileext returns the extension of file.
filename returns the file name of file (including the extension).
filesetext returns file with the extension set to newext.
Example
if (board) board(B) {
output(filesetext(B.name, ".out")) {
...
}
}
Filedata Functions
See also time,
Filename Functions
int filetime(string filename);
filetime returns the timestamp of the given file in seconds. The format is
compatible to be used with the time functions.
Example
board(B)
printf("Board: %s\nSize: %d\nTime: %s\n",
B.name, filesize(B.name),
t2string(filetime(B.name)));
File Input Functions
File input functions are used to read data from files.
fileread()
See also lookup,
strsplit,
fileerror
The actual meaning of the return value depends on the type of dest.
Example
char b[];
int nBytes = fileread(b, "data.bin");
string lines[];
int nLines = fileread(lines, "data.txt");
string text;
int nChars = fileread(text, "data.txt");
Mathematical Functions
Mathematical functions are used to perform mathematical
operations.
Error Messages
If the arguments of a mathematical function call lead to an error, the
error message will show the actual values of the arguments. Thus the
statements
real x = -1.0;
real r = sqrt(2 * x);
will lead to the error message
Invalid argument in call to 'sqrt(-2)'
Absolute, Maximum and Minimum Functions
type max(type x, type y);
type min(type x, type y);
max returns the maximum of x and y.
min returns the minimum of x and y.
Example
real x = 2.567, y = 3.14;
printf("The maximum is %f\n", max(x, y));
Rounding Functions
real floor(real x);
real frac(real x);
real round(real x);
real trunc(real x);
floor returns the largest integer not greater than x.
frac returns the fractional part of x.
round returns x rounded to the nearest integer.
trunc returns the integer part of x.
Example
real x = 2.567;
printf("The rounded value of %f is %f\n", x, round(x));
Trigonometric Functions
real asin(real x);
real atan(real x);
real cos(real x);
real sin(real x);
real tan(real x);
asin returns the arc sine of x.
atan returns the arc tangent of x.
cos returns the cosine of x.
sin returns the sine of x.
tan returns the tangent of x.
Constants
PI the value of "pi" (3.14...) Note
Angles are given in radian.
Example
real x = PI / 2;
printf("The sine of %f is %f\n", x, sin(x));
Exponential Functions
real log(real x);
real log10(real x);
real pow(real x, real y);
real sqrt(real x);
log returns the natural logarithm of x.
log10 returns the base 10 logarithm of x.
pow returns the value of x to the power of y.
sqrt returns the square root of x.
Example
real x = 2.1;
printf("The square root of %f is %f\n", x, sqrt(x));
printf("The 3rd root of %f is %f\n", x, pow(x, 1.0/3));
Miscellaneous Functions
Miscellaneous functions are used to perform various tasks.
Configuration Parameters
The cfgget function retrieves values that have previously been stored with
a call to cfgset().
void cfgset(string name, string value);
Parameter names are case sensitive.
mytool.MyParam
Because the configuration parameters are stored in the eaglerc file, which also
contains all of EAGLE's other user specific parameters, it is also possible to
access the EAGLE parameters with cfgget() and cfgset().
In order to make sure no ULP parameters collide with any EAGLE parameters, the
EAGLE parameters must be prefixed with "EAGLE:", as in
EAGLE:Option.XrefLabelFormat
Note that there is no documentation of all of EAGLE's internal parameters and how
they are stored in the eaglerc file. Also, be very careful when changing any of these
parameters! As with the eaglerc file itself, you should only manipulate these
parameters if you know what you are doing! Some EAGLE parameters may require a
restart of EAGLE for changes to take effect.
ULP:mytool.MyParam
Example
string MyParam = cfgget("mytool.MyParam", "SomeDefault");
MyParam = "OtherValue";
cfgset("mytool.MyParam", MyParam);
country()
See also language
Example
dlgMessageBox("Your country code is: " + country());
exit()
See also RUN
void exit(string command);
If an integer result is given it will be used as the
return value of the program.
If a string command is given, that command will be executed as if it
were entered into the command line immediately after the RUN command. In that
case the return value of the ULP is set to EXIT_SUCCESS.
Constants
EXIT_SUCCESS return value for successful program execution (value 0) EXIT_FAILURE return value for failed program execution (value -1) fdlsignature()
The fdlsignature function is used to calculate a digital signature
when accessing Premier Farnell's Design Link interface.
language()
See also country
Example
string I18N[] = {
"en\v"
"de\v"
"it\v"
,
"I18N Demo\v"
"Beispiel für Internationalisierung\v"
"Esempio per internazionalizzazione\v"
,
"Hello world!\v"
"Hallo Welt!\v"
"Ciao mondo!\v"
,
"+Ok\v"
"+Ok\v"
"+Approvazione\v"
,
"-Cancel\v"
"-Abbrechen\v"
"-Annullamento\v"
};
int Language = strstr(I18N[0], language()) / 3;
string tr(string s)
{
string t = lookup(I18N, s, Language, '\v');
return t ? t : s;
}
dlgDialog(tr("I18N Demo")) {
dlgHBoxLayout dlgSpacing(350);
dlgLabel(tr("Hello world!"));
dlgHBoxLayout {
dlgPushButton(tr("+Ok")) dlgAccept();
dlgPushButton(tr("-Cancel")) dlgReject();
}
};
lookup()
See also fileread,
strsplit
string lookup(string array[], string key, string field_name[, char separator]);
If the field doesn't exist, or no string matching key is found,
an empty string is returned.
It is up to the user to make sure that the first record actually
contains header information.
It is best to use the default "tab" separator, which doesn't have these problems
(no field can contain a tabulator).
Name;Manufacturer;Code;Price
7400;Intel;I-01-234-97;$0.10
68HC12;Motorola;M68HC1201234;$3.50
Example
string OrderCodes[];
if (fileread(OrderCodes, "ordercodes") > 0) {
if (lookup(OrderCodes, "", "Code", ';')) {
schematic(SCH) {
SCH.parts(P) {
string OrderCode;
// both following statements do exactly the same:
OrderCode = lookup(OrderCodes, P.device.name, "Code", ';');
OrderCode = lookup(OrderCodes, P.device.name, 2, ';');
}
}
}
else
dlgMessageBox("Missing 'Code' field in file 'ordercodes');
}
palette()
The palette function returns the ARGB value of the color with the given
index (which may be in the range 0..PALETTE_ENTRIES-1). If type is not
given (or is -1) the palette assigned to the current editor window will
be used. Otherwise type specifies which color palette to use (PALETTE_BLACK,
PALETTE_WHITE or PALETTE_COLORED).
Constants
PALETTE_TYPES the number of palette types (3) PALETTE_BLACK the black background palette (0) PALETTE_WHITE the white background palette (1) PALETTE_COLORED the colored background palette (2) PALETTE_ENTRIES the number of colors per palette (64) sleep()
See also time()
sort()
The sort function either directly sorts a given array1,
or it sorts a set of arrays (starting with array2), in which case
array1 is supposed to be an array of int, which will
be used as a pointer array.
Sorting a single array
If the sort function is called with one single array, that array
will be sorted directly, as in the following example:
string A[];
int n = 0;
A[n++] = "World";
A[n++] = "Hello";
A[n++] = "The truth is out there...";
sort(n, A);
for (int i = 0; i < n; ++i)
printf(A[i]);
Sorting a set of arrays
If the sort function is called with more than one array, the first
array must be an array of int, while all of the other arrays may be
of any array type and hold the data to be sorted. The following example
illustrates how the first array will be used as a pointer:
numeric string Nets[], Parts[], Instances[], Pins[];
int n = 0;
int index[];
schematic(S) {
S.nets(N) N.pinrefs(P) {
Nets[n] = N.name;
Parts[n] = P.part.name;
Instances[n] = P.instance.name;
Pins[n] = P.pin.name;
++n;
}
sort(n, index, Nets, Parts, Instances, Pins);
for (int i = 0; i < n; ++i)
printf("%-8s %-8s %-8s %-8s\n",
Nets[index[i]], Parts[index[i]],
Instances[index[i]], Pins[index[i]]);
}
The idea behind this is that one net can have several pins connected to it,
and in a netlist you might want to have the net names sorted, and within
one net you also want the part names sorted and so on.
status()
See also dlgMessageBox()
system()
The system function executes the external program given by the command
string, and waits until the program ends.
Input/Output redirection
If the external program shall read its standard input from (or write its standard
output to) a particular file, input/output needs to be redirected.
On Linux and Mac OS X this is done by simply adding a '<' or
'>' to the command line, followed by the desired file name, as in
system("program < infile > outfile");
which runs program and makes it read from infile and write
to outfile.
On Windows you have to explicitly run a command processor to do this, as in
system("cmd.exe /c program < infile > outfile");
(on DOS based Windows systems use command.com instead of cmd.exe).
Background execution
The system function waits until the given program has ended.
This is useful for programs that only run for a few seconds, or completely
take over the user's attention.
If an external program runs for a longer time, and you want the system
call to return immediately, without waiting for the program to end, you
can simply add an '&' to the command string under Linux and
Mac OS X, as in
system("program &");
Under Windows you need to explicitly run a command processor to do this, as in
system("cmd.exe /c start program");
(on DOS based Windows systems use command.com instead of cmd.exe).
Example
int result = system("simulate -f filename");
This would call a simulation program, giving it a file which the ULP has
just created.
Note that simulate here is just an example, it is not part of the EAGLE package!
int MySystem(string command)
{
if (dlgMessageBox("!Ok to execute the following command?<p><tt>" + command + "</tt>", "&Yes", "&No") == 0)
return system(command);
return -1;
}
int result = MySystem("simulate -f filename");
Unit Conversions
See also UL_GRID
real u2mic(int n);
real u2mil(int n);
real u2mm(int n);
int inch2u(real n);
int mic2u(real n);
int mil2u(real n);
int mm2u(real n);
u2mic returns the value of n in microns (1/1000mm).
u2mil returns the value of n in mil (1/1000inch).
u2mm returns the value of n in millimeters.
inch2u returns the value of n (which is in inch) as internal units.
mic2u returns the value of n (which is in microns) as internal units.
mil2u returns the value of n (which is in mil) as internal units.
mm2u returns the value of n (which is in millimeters) as internal units.
Example
board(B) {
B.elements(E) {
printf("%s at (%f, %f)\n", E.name,
u2mm(E.x), u2mm(E.y));
}
}
Network Functions
Network functions are used to access remote sites on the Internet.
neterror()
See also netget,
netpost
If no error has occurred, the return value is an empty string.
Example
string Result;
if (netget(Result, "http://web.cadsoft.de/cgi-bin/http-test?see=me&hear=them") >= 0) {
// process Result
}
else
dlgMessageBox(neterror());
netget()
See also netpost,
neterror,
fileread
The actual meaning of the return value depends on the type of dest.
In case of an error, a negative value is returned and
neterror()
may be called to display an error message to the user.
If no network activity has occurred for timeout seconds,
the connection will be terminated. The default timeout is 20 seconds.
The url must contain the protocol to use (HTTP, HTTPS or FTP) and can
contain name=value pairs of parameters, as in
http://web.cadsoft.de/cgi-bin/http-test?see=me&hear=them
ftp://ftp.cadsoft.de/eagle/userfiles/README
If a user id and password is required to access a remote site, these can be
given as
https://userid:password@www.secret-site.com/...
If dest is a character array, the result will be treated as raw binary data
and the return value reflects the number of bytes stored in the character array.
SSL Connections
For SSL connections (request per HTTPS) certificates are necessary, which may miss
or be expired on some systems. The connection fails then with according error message
that you can query with neterror().
With this error message it should be possible to install missing or update expired
certificates and make the connection work this way. It depends on your system how to
do this (in Windows e.g. via Control Panel/Internet Options etc.).
Example
string Result;
if (netget(Result, "http://web.cadsoft.de/cgi-bin/http-test?see=me&hear=them") >= 0) {
// process Result
}
else
dlgMessageBox(neterror());
netpost()
See also netget,
neterror,
fileread
The actual meaning of the return value depends on the type of dest.
In case of an error, a negative value is returned and
neterror()
may be called to display an error message to the user.
If no network activity has occurred for timeout seconds,
the connection will be terminated. The default timeout is 20 seconds.
If content_type is given, it overwrites the default content type
of "text/html; charset=utf-8".
The url must contain the protocol to use (HTTP or HTTPS).
https://userid:password@www.secret-site.com/...
If dest is a character array, the result will be treated as raw binary data
and the return value reflects the number of bytes stored in the character array.
Example
string Data = "see=me\nhear=them";
string Result;
if (netpost(Result, "http://web.cadsoft.de/cgi-bin/http-test", Data) >= 0) {
// process Result
}
else
dlgMessageBox(neterror());
Printing Functions
Printing functions are used to print formatted strings.
printf()
See also sprintf,
output,
fileerror
Format string
The format string controls how the arguments will be converted,
formatted and printed. There must be exactly as many arguments
as necessary for the format. The number and type of arguments
will be checked against the format, and any mismatch will lead
to an error message.
Format specifiers
A format specifier has the following form:
Conversion type characters
d signed decimal int o unsigned octal int u unsigned decimal int x unsigned hexadecimal int (with a, b,...) X unsigned hexadecimal int (with A, B,...) f signed real value of the form [-]dddd.dddd e signed real value of the form [-]d.dddde[±]ddd E same as e, but with E for exponent g signed real value in either e or f form, based on given value and precision G same as g, but with E for exponent if e format used c single character s character string % the % character is printed Flag characters
The following flag characters can appear in any order and combination.
"-" the formatted item is left-justified within the field; normally, items are right-justified "+" a signed, positive item will always start with a plus character (+); normally, only negative items begin with a sign " " a signed, positive item will always start with a space character; if both "+" and " " are specified, "+" overrides " " Width specifiers
The width specifier sets the minimum field width for an output value.
n At least n characters are printed. If the output value has less than n characters, the output is padded with blanks (right-padded if "-" flag given, left-padded otherwise). 0n At least n characters are printed. If the output value has less than n characters, it is filled on the left with zeros. * The argument list supplies the width specifier, which must precede the actual argument being formatted. Precision specifiers
A precision specifier always begins with a period (.) to
separate it from any preceding width specifier. Then, like width,
precision is specified either directly through a decimal digit string, or
indirectly, through an asterisk (*). If you use an asterisk for the
precision specifier, the preceding argument (which must be an int) to the one being
formatted (with this format specifier) determines the precision.
none Precision set to default. .0 For int types, precision is set to default; for real types, no decimal point is printed. .n n characters or n decimal places are printed. If the output value has more than n characters the output might be truncated or rounded (depending on the type character). * The argument list supplies the precision specifier, which must precede the actual argument being formatted. Default precision values
douxX 1 eEf 6 gG all significant digits c no effect s print entire string How precision specification (.n) affects conversion
douxX .n specifies that at least n characters are printed. If the input argument has less than n digits, the output value is left-padded with zeros. If the input argument has more than n digits, the output value is not truncated. eEf .n specifies that n characters are printed after the decimal point, and the last digit printed is rounded. gG .n specifies that at most n significant digits are printed. c .n has no effect on the output. s .n specifies that no more than n characters are printed. Binary zero characters
Unlike sprintf, the printf function can print binary zero characters (0x00).
char c = 0x00;
printf("%c", c);
Example
int i = 42;
real r = 3.14;
char c = 'A';
string s = "Hello";
printf("Integer: %8d\n", i);
printf("Hex: %8X\n", i);
printf("Real: %8f\n", r);
printf("Char: %-8c\n", c);
printf("String: %-8s\n", s);
sprintf()
See also printf
Format string
See printf.
Binary zero characters
Note that sprintf can not return strings with embedded binary zero
characters (0x00). If the resulting string contains a binary zero character,
any characters following that zero character will be dropped.
Use printf if you need to output binary data.
Example
string result;
int number = 42;
sprintf(result, "The number is %d", number);
String Functions
String functions are used to manipulate character strings.
strchr()
See also strrchr,
strstr
Example
string s = "This is a string";
char c = 'a';
int pos = strchr(s, c);
if (pos >= 0)
printf("The character %c is at position %d\n", c, pos);
else
printf("The character was not found\n");
strjoin()
See also strsplit,
lookup,
fileread
Example
string a[] = { "Field 1", "Field 2", "Field 3" };
string s = strjoin(a, ':');
strlen()
Example
string s = "This is a string";
int l = strlen(s);
printf("The string is %d characters long\n", l);
strlwr()
See also strupr,
tolower
Example
string s = "This Is A String";
string r = strlwr(s);
printf("Prior to strlwr: %s - after strlwr: %s\n", s, r);
strrchr()
See also strchr,
strrstr
Example
string s = "This is a string";
char c = 'a';
int pos = strrchr(s, c);
if (pos >= 0)
printf("The character %c is at position %d\n", c, pos);
else
printf("The character was not found\n");
strrstr()
See also strstr,
strrchr
Example
string s1 = "This is a string", s2 = "is a";
int pos = strrstr(s1, s2);
if (pos >= 0)
printf("The substring starts at %d\n", pos);
else
printf("The substring was not found\n");
strsplit()
See also strjoin,
lookup,
fileread
Example
string a[];
int n = strsplit(a, "Field 1:Field 2:Field 3", ':');
strstr()
See also strrstr,
strchr,
strxstr
Example
string s1 = "This is a string", s2 = "is a";
int pos = strstr(s1, s2);
if (pos >= 0)
printf("The substring starts at %d\n", pos);
else
printf("The substring was not found\n");
strsub()
Example
string s = "This is a string";
string t = strsub(s, 4, 7);
printf("The extracted substring is: %s\n", t);
strtod()
See also strtol
Example
string s = "3.1415";
real r = strtod(s);
printf("The value is %f\n", r);
strtol()
See also strtod
Example
string s = "1234";
int i = strtol(s);
printf("The value is %d\n", i);
strupr()
See also strlwr,
toupper
Example
string s = "This Is A String";
string r = strupr(s);
printf("Prior to strupr: %s - after strupr: %s\n", s, r);
strxstr()
See also strstr,
strchr,
strrstr
Details on regular expressions can be found, for instance, in the book
Mastering Regular Expressions by Jeffrey E. F. Friedl.
Example
string s1 = "This is a string", s2 = "i.*a";
int len = 0;
int pos = strxstr(s1, s2, 0, len);
if (pos >= 0)
printf("The substring starts at %d and is %d charcaters long\n", pos, len);
else
printf("The substring was not found\n");
Time Functions
Time functions are used to get and process time and date
information.
time()
See also Time Conversions,
filetime,
timems()
Example
int CurrentTime = time();
timems()
See also time
Example
int elapsed = timems();
Time Conversions
See also time
int t2dayofweek(int t);
int t2hour(int t);
int t2minute(int t);
int t2month(int t);
int t2second(int t);
int t2year(int t);
string t2string(int t[, string format]);
t2dayofweek returns the day of the week (0=sunday..6)
t2hour returns the hour (0..23)
t2minute returns the minute (0..59)
t2month returns the month (0..11)
t2second returns the second (0..59)
t2year returns the year (including century!)
t2string returns a formatted string containing date and time
d the day as a number without a leading zero (1 to 31) dd the day as a number with a leading zero (01 to 31) ddd the abbreviated localized day name (e.g. "Mon" to "Sun") dddd the long localized day name (e.g. "Monday" to "Sunday") M the month as a number without a leading zero (1-12) MM the month as a number with a leading zero (01-12) MMM the abbreviated localized month name (e.g. "Jan" to "Dec") MMMM the long localized month name (e.g. "January" to "December") yy the year as a two digit number (00-99) yyyy the year as a four digit number h the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) hh the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) m the minute without a leading zero (0 to 59) mm the minute with a leading zero (00 to 59) s the second without a leading zero (0 to 59) ss the second with a leading zero (00 to 59) z the milliseconds without leading zeros (always 0, since the given time only has a one second resolution) zzz the milliseconds with leading zeros (always 000, since the given time only has a one second resolution) AP use AM/PM display (AP will be replaced by either "AM" or "PM") ap use am/pm display (ap will be replaced by either "am" or "pm") U display the given time as UTC (must be the first character; default is local time) Example
int t = time();
printf("It is now %02d:%02d:%02d\n",
t2hour(t), t2minute(t), t2second(t));
printf("ISO time is %s\n", t2string(t, "Uyyyy-MM-dd hh:mm:ss"));
Object Functions
Object functions are used to access common information about objects.
clrgroup()
See also ingroup(),
setgroup(),
GROUP command
Example
board(B) {
B.elements(E)
clrgroup(E);
}
ingroup()
See also clrgroup(),
setgroup(),
GROUP command
UL_CONTACTREF and UL_PINREF, though not having coordinates of their own, return
a non-zero value if the referenced UL_CONTACT or UL_PIN, respectively, is within
the group.
For other not selectable objects like UL_GRID, UL_VARIANT or wires of a UL_TEXT or
UL_FRAME object, the behaviour of ingroup() is undefined and therefore should not be used.
Identifying the context menu object
If the ULP is started from a context menu the selected object can be accessed
by the group mechansim. A one element group is made from the selected object.
So it can be identified with ingroup().
(see also SET and RUN).
Example
output("group.txt") {
board(B) {
B.elements(E) {
if (ingroup(E))
printf("Element %s is in the group\n", E.name);
}
}
}
setgroup()
See also clrgroup(),
ingroup(),
GROUP command
It's not the case for UL_LIBRARY and UL_SCHEMATIC. Subordinate objects that are not selectable
or not inidividually selectable are not flagged (e.g. UL_GRID or UL_VARIANT objects or wires
of UL_TEXT or UL_FRAME objects).
For details on the object hierarchies see Object Types.
Example
board(B) {
B.elements(E)
setgroup(E);
}
setvariant()
See also variant(),
UL_VARIANTDEF,
VARIANT command
Example
if (setvariant("My variant")) {
// do something ...
else
// error: unknown variant
variant()
See also setvariant(),
UL_VARIANTDEF,
VARIANT command
Example
string CurrentVariant = variant();
XML Functions
XML functions are used to process XML (Extensible Markup Language) data.
xmlattribute(), xmlattributes()
See also xmlelement(),
xmltags(),
xmltext()
int xmlattributes(string &array[], string xml, string tag);
Example
// String XML contains the following data:
//<root>
// <body abc="def" xyz="123">
// ...
// </body>
//</root>
string s[];
int n = xmlattributes(s, XML, "root/body");
// Result: { "abc", "xyz" }
string s = xmlattribute(XML, "root/body", "xyz");
// Result: "123"
xmlelement(), xmlelements()
See also xmltags(),
xmlattribute(),
xmltext()
int xmlelements(string &array[], string xml, string tag);
If there is more than one occurrence of tag within xml, the
first one will be returned. Use xmlelements if you want to get all
occurrences.
Example
// String XML contains the following data:
//<root>
// <body>
// <contents>
// <string>Some text 1</string>
// <any>anything 1</any>
// </contents>
// <contents>
// <string>Some text 2</string>
// <any>anything 2</any>
// </contents>
// <appendix>
// <string>Some text 3</string>
// </appendix>
// </body>
//</root>
//
string s = xmlelement(XML, "root/body/appendix");
// Result: " <appendix>\n <string>Some text 3</string>\n </appendix>\n"
string s[];
int n = xmlelements(s, XML, "root/body/contents");
// Result: { " <contents>\n <string>Some text 1</string>\n <any>anything 1</any>\n </contents>\n",
// " <contents>\n <string>Some text 2</string>\n <any>anything 2</any>\n </contents>\n"
// }
xmltags()
See also xmlelement(),
xmlattribute(),
xmltext()
Example
//String XML contains the following data:
//<root>
// <body>
// <contents>
// <string>Some text 1</string>
// <any>anything 1</any>
// </contents>
// <contents>
// <string>Some text 2</string>
// <any>anything 2</any>
// </contents>
// <appendix>
// <string>Some text 3</string>
// </appendix>
// </body>
//</root>
//
string s[];
int n = xmltags(s, XML, "root/body");
// Result: { "contents", "appendix" }
int n = xmltags(s, XML, "");
// Result: "root"
xmltext()
See also xmlelement(),
xmlattribute(),
xmltags()
Example
// String XML contains the following data:
//<root>
// <body>
// Some <b>text</b>.
// </body>
//</root>
//
string s = xmltext(XML, "root/body");
// Result: "\n Some text.\n "
Builtin Statements
Builtin statements are generally used to open a certain context in which
data structures or files can be accessed.
name(parameters) statement
where name is the name of the builtin statement, parameters
stands for one or more parameters, and statement is the code that
will be executed inside the context opened by the builtin statement.
board(B) {
B.elements(E) printf("Element: %s\n", E.name);
B.Signals(S) printf("Signal: %s\n", S.name);
}
The following builtin statements are available:
board()
See also schematic,
library
Check if there is a board
By using the board statement without an argument you can check
if the current editor window contains a board drawing. In that case,
board behaves like an integer constant, returning 1 if
there is a board drawing in the current editor window, and 0
otherwise.
Accessing board from a schematic
If the current editor window contains a schematic drawing, you can still
access that schematic's board by preceding the board statement
with the prefix project, as in
project.board(B) { ... }
This will open a board context regardless whether the current editor window
contains a board or a schematic drawing. However, there must be an editor
window containing that board somewhere on the desktop!
Example
if (board)
board(B) {
B.elements(E)
printf("Element: %s\n", E.name);
}
deviceset()
See also package,
symbol,
library
Check if there is a device set
By using the deviceset statement without an argument you can check
if the current editor window contains a device drawing. In that case,
deviceset behaves like an integer constant, returning 1 if
there is a device drawing in the current editor window, and 0
otherwise.
Example
if (deviceset)
deviceset(D) {
D.gates(G)
printf("Gate: %s\n", G.name);
}
library()
See also board,
schematic,
deviceset,
package,
symbol
Check if there is a library
By using the library statement without an argument you can check
if the current editor window contains a library drawing. In that case,
library behaves like an integer constant, returning 1 if
there is a library drawing in the current editor window, and 0
otherwise.
Example
if (library)
library(L) {
L.devices(D)
printf("Device: %s\n", D.name);
}
module()
See also board,
library,
schematic,
sheet
Check if there is a module
By using the module statement without an argument you can check
#if the current editor window contains a module drawing. In that case,#
if in the editor window currently a module drawing is edited. In that case,
module behaves like an integer constant, returning 1 if
there is a module drawing in the current editor window, and 0
otherwise.
Example
if (module)
module(M) {
printf("Module: %s\n", M.name);
}
output()
See also printf,
fileerror
File Modes
The mode parameter defines how the output file is to be opened.
If no mode parameter is given, the default is "wt".
a append to an existing file, or create a new file if it does not exist w create a new file (overwriting an existing file) t open file in text mode b open file in binary mode D delete this file when ending the EAGLE session (only works together with w) F force using this file name (normally *.brd, *.sch and *.lbr are rejected) Nested Output statements
output statements can be nested, as long as there are enough file
handles available, and provided that no two active output statements
access the same file.
Example
void PrintText(string s)
{
printf("This also goes into the file: %s\n", s);
}
output("file.txt", "wt") {
printf("Directly printed\n");
PrintText("via function call");
}
package()
See also library,
deviceset,
symbol
Check if there is a package
By using the package statement without an argument you can check
if the current editor window contains a package drawing. In that case,
package behaves like an integer constant, returning 1 if
there is a package drawing in the current editor window, and 0
otherwise.
Example
if (package)
package(P) {
P.contacts(C)
printf("Contact: %s\n", C.name);
}
schematic()
See also board,
library,
module,
sheet
Check if there is a schematic
By using the schematic statement without an argument you can check
if the current editor window contains a schematic drawing. In that case,
schematic behaves like an integer constant, returning 1 if
there is a schematic drawing in the current editor window, and 0
otherwise.
Accessing schematic from a board
If the current editor window contains a board drawing, you can still
access that board's schematic by preceding the schematic statement
with the prefix project, as in
project.schematic(S) { ... }
This will open a schematic context regardless whether the current editor window
contains a schematic or a board drawing. However, there must be an editor
window containing that schematic somewhere on the desktop!
Access the current Sheet
Use the sheet statement to
directly access the currently loaded sheet.
Access the current Module
Use the module statement to
directly access the currently edited module.
Example
if (schematic)
schematic(S) {
S.parts(P)
printf("Part: %s\n", P.name);
}
sheet()
See also schematic
Check if there is a sheet
By using the sheet statement without an argument you can check
if the current editor window contains a sheet drawing. In that case,
sheet behaves like an integer constant, returning 1 if
there is a sheet drawing in the current editor window, and 0
otherwise.
Example
if (sheet)
sheet(S) {
S.instances(I)
printf("Instance: %s\n", I.name);
}
symbol()
See also library,
deviceset,
package
Check if there is a symbol
By using the symbol statement without an argument you can check
if the current editor window contains a symbol drawing. In that case,
symbol behaves like an integer constant, returning 1 if
there is a symbol drawing in the current editor window, and 0
otherwise.
Example
if (symbol)
symbol(S) {
S.pins(P)
printf("Pin: %s\n", P.name);
}
Dialogs
User Language Dialogs allow you to define your own frontend to a User Language Program.
Predefined Dialogs describes the ready to use standard dialogs Dialog Objects defines the objects that can be used in a dialog Layout Information explains how to define the location of objects within a dialog Dialog Functions describes special functions for use with dialogs A Complete Example shows a complete ULP with a data entry dialog Predefined Dialogs
Predefined Dialogs implement the typical standard dialogs that are frequently used
for selecting file names or issuing error messages.
dlgDirectory()
See also dlgFileOpen
If the user has canceled the dialog, the result will be an empty string.
Example
string dirName;
dirName = dlgDirectory("Select a directory", "");
dlgFileOpen(), dlgFileSave()
See also dlgDirectory
string dlgFileSave(string Title[, string Start[, string Filter]])
If the user has canceled the dialog, the result will be an empty string.
Example
string fileName;
fileName = dlgFileOpen("Select a file", "", "*.brd");
dlgMessageBox()
See also status()
The first button in button_list has index 0.
A maximum of three buttons can be defined.
If no button_list is given, it defaults to "OK".
';' - for an Information
'!' - for a Warning
':' - for an Error
If, however, the Message shall begin with one of these characters, it has to be escaped.
On Mac OS X only the character ':' will actually result in
showing an icon. All others are ignored.
Example
if (dlgMessageBox("!Are you sure?", "&Yes", "&No") == 0) {
// let's do it!
}
Dialog Objects
A User Language Dialog is built from the following Dialog Objects:
dlgCell a grid cell context dlgCheckBox a checkbox dlgComboBox a combo box selection field dlgDialog the basic container of any dialog dlgGridLayout a grid based layout context dlgGroup a group field dlgHBoxLayout a horizontal box layout context dlgIntEdit an integer entry field dlgLabel a text label dlgListBox a list box dlgListView a list view dlgPushButton a push button dlgRadioButton a radio button dlgRealEdit a real entry field dlgSpacing a layout spacing object dlgSpinBox a spin box selection field dlgStretch a layout stretch object dlgStringEdit a string entry field dlgTabPage a tab page dlgTabWidget a tab page container dlgTextEdit a text entry field dlgTextView a text viewer field dlgVBoxLayout a vertical box layout context dlgCell
See also dlgGridLayout,
dlgHBoxLayout,
dlgVBoxLayout,
Layout Information,
A Complete Example
Example
string Text;
dlgGridLayout {
dlgCell(0, 0) dlgLabel("Cell 0,0");
dlgCell(1, 2, 4, 7) dlgTextEdit(Text);
}
dlgCheckBox
See also dlgRadioButton,
dlgGroup,
Layout Information,
A Complete Example
All check boxes within the same dialog must have different Checked variables!
Example
int mirror = 0;
int rotate = 1;
int flip = 0;
dlgGroup("Orientation") {
dlgCheckBox("&Mirror", mirror);
dlgCheckBox("&Rotate", rotate);
dlgCheckBox("&Flip", flip);
}
dlgComboBox
See also dlgListBox,
dlgLabel,
Layout Information,
A Complete Example
Before the statement is executed, all variables that have been used with dialog objects
are updated to their current values, and any changes made to these variables inside the
statement will be reflected in the dialog when the statement returns.
Example
string Colors[] = { "red", "green", "blue", "yellow" };
int Selected = 2; // initially selects "blue"
dlgComboBox(Colors, Selected) dlgMessageBox("You have selected " + Colors[Selected]);
dlgDialog
See also dlgGridLayout,
dlgHBoxLayout,
dlgVBoxLayout,
dlgAccept,
dlgReset,
dlgReject,
A Complete Example
If the dialog is simply closed, the return value will be -1.
Examples
int Result = dlgDialog("Hello") {
dlgLabel("Hello world");
dlgPushButton("+OK") dlgAccept();
};
int haveButton = 1;
dlgDialog("Test") {
dlgLabel("Start");
if (haveButton)
dlgPushButton("Here") dlgAccept();
};
dlgGridLayout
See also dlgCell,
dlgHBoxLayout,
dlgVBoxLayout,
Layout Information,
A Complete Example
The number of rows and columns is automatically extended according to the location of
dialog objects that are defined within the grid layout context, so you don't have
to explicitly define the number of rows and columns.
Example
dlgGridLayout {
dlgCell(0, 0) dlgLabel("Row 0/Col 0");
dlgCell(1, 0) dlgLabel("Row 1/Col 0");
dlgCell(0, 1) dlgLabel("Row 0/Col 1");
dlgCell(1, 1) dlgLabel("Row 1/Col 1");
}
dlgGroup
See also dlgCheckBox,
dlgRadioButton,
Layout Information,
A Complete Example
Radio buttons within a dlgGroup are numbered starting with 0.
Example
int align = 1;
dlgGroup("Alignment") {
dlgRadioButton("&Top", align);
dlgRadioButton("&Center", align);
dlgRadioButton("&Bottom", align);
}
dlgHBoxLayout
See also dlgGridLayout,
dlgVBoxLayout,
Layout Information,
A Complete Example
Example
dlgHBoxLayout {
dlgLabel("Box 1");
dlgLabel("Box 2");
dlgLabel("Box 3");
}
dlgIntEdit
See also dlgRealEdit,
dlgStringEdit,
dlgLabel,
Layout Information,
A Complete Example
Example
int Value = 42;
dlgHBoxLayout {
dlgLabel("Enter a &Number between 0 and 99");
dlgIntEdit(Value, 0, 99);
}
dlgLabel
See also Layout Information,
A Complete Example,
dlgRedisplay()
Example
string OS = "Windows";
dlgHBoxLayout {
dlgLabel(OS, 1);
dlgPushButton("&Change OS") { OS = "Linux"; }
}
dlgListBox
See also dlgComboBox,
dlgListView,
dlgSelectionChanged,
dlgLabel,
Layout Information,
A Complete Example
Before the statement is executed, all variables that have been used with dialog objects
are updated to their current values, and any changes made to these variables inside the
statement will be reflected in the dialog when the statement returns.
Example
string Colors[] = { "red", "green", "blue", "yellow" };
int Selected = 2; // initially selects "blue"
dlgListBox(Colors, Selected) dlgMessageBox("You have selected " + Colors[Selected]);
dlgListView
See also dlgListBox,
dlgSelectionChanged,
dlgLabel,
Layout Information,
A Complete Example
If no particular entry shall be initially selected, Selected should be
initialized to -1.
If it is set to -2, the first item according
to the current sort column is made current.
If no view entry has been selected, -1 is returned.
Before the statement is executed, all variables that have been used with dialog objects
are updated to their current values, and any changes made to these variables inside the
statement will be reflected in the dialog when the statement returns.
Example
string Colors[] = { "red\tThe color RED", "green\tThe color GREEN", "blue\tThe color BLUE" };
int Selected = 0; // initially selects "red"
dlgListView("Name\tDescription", Colors, Selected) dlgMessageBox("You have selected " + Colors[Selected]);
dlgPushButton
See also Layout Information,
Dialog Functions,
A Complete Example
If Text starts with a '-' character, this button will become the cancel
button, which will be selected if the user closes the dialog.
CAUTION: Make sure that the statement of such a marked cancel button contains
a call to dlgReject()! Otherwise the user may be unable
to close the dialog at all!
To have an actual '+' or '-' character as the first character of the text
it has to be escaped.
Before the statement is executed, all variables that have been used with dialog objects
are updated to their current values, and any changes made to these variables inside the
statement will be reflected in the dialog when the statement returns.
Example
int defaultWidth = 10;
int defaultHeight = 20;
int width = 5;
int height = 7;
dlgPushButton("&Reset defaults") {
width = defaultWidth;
height = defaultHeight;
}
dlgPushButton("+&Accept") dlgAccept();
dlgPushButton("-Cancel") { if (dlgMessageBox("Are you sure?", "Yes", "No") == 0) dlgReject(); }
dlgRadioButton
See also dlgCheckBox,
dlgGroup,
Layout Information,
A Complete Example
All radio buttons within the same group must use the same Selected variable!
The initial value of Selected defines which radio button is initially selected.
If Selected is outside the valid range for this group, no radio button will be selected.
In order to get the correct radio button selection, Selected must be set before
the first dlgRadioButton is defined, and must not be modified between adding subsequent
radio buttons. Otherwise it is undefined which (if any) radio button will be selected.
Example
int align = 1;
dlgGroup("Alignment") {
dlgRadioButton("&Top", align);
dlgRadioButton("&Center", align);
dlgRadioButton("&Bottom", align);
}
dlgRealEdit
See also dlgIntEdit,
dlgStringEdit,
dlgLabel,
Layout Information,
A Complete Example
Example
real Value = 1.4142;
dlgHBoxLayout {
dlgLabel("Enter a &Number between 0 and 99");
dlgRealEdit(Value, 0.0, 99.0);
}
dlgSpacing
See also dlgHBoxLayout,
dlgVBoxLayout,
dlgStretch,
Layout Information,
A Complete Example
Example
dlgVBoxLayout {
dlgLabel("Label 1");
dlgSpacing(40);
dlgLabel("Label 2");
}
dlgSpinBox
See also dlgIntEdit,
dlgLabel,
Layout Information,
A Complete Example
Example
int Value = 42;
dlgHBoxLayout {
dlgLabel("&Select value");
dlgSpinBox(Value, 0, 99);
}
dlgStretch
See also dlgHBoxLayout,
dlgVBoxLayout,
dlgSpacing,
Layout Information,
A Complete Example
Example
dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK") { dlgAccept(); };
dlgPushButton("Cancel") { dlgReject(); };
}
dlgStringEdit
See also dlgRealEdit,
dlgIntEdit,
dlgTextEdit,
dlgLabel,
Layout Information,
A Complete Example
None of the strings in History may be empty (if there is an empty string,
all strings after and including that one will be dropped).
Example
string Name = "Linus";
dlgHBoxLayout {
dlgLabel("Enter &Name");
dlgStringEdit(Name);
}
dlgTabPage
See also dlgTabWidget,
Layout Information,
A Complete Example
Example
dlgTabWidget {
dlgTabPage("Tab &1") {
dlgLabel("This is page 1");
}
dlgTabPage("Tab &2") {
dlgLabel("This is page 2");
}
}
dlgTabWidget
See also dlgTabPage,
Layout Information,
A Complete Example
dlgTabWidget(int &Index) { tabpages }
Examples
dlgTabWidget {
dlgTabPage("Tab &1") {
dlgLabel("This is page 1");
}
dlgTabPage("Tab &2") {
dlgLabel("This is page 2");
}
}
dlgDialog("test")
{
int TabNr = 0;
int CheckBoxValue[];
dlgTabWidget(TabNr) {
for (int i = 0; i <= 9; i++) {
string s;
sprintf(s, "%d", i);
dlgTabPage("Tab " + s) {
dlgLabel("This is page " + s);
dlgCheckBox(s, CheckBoxValue[i]) {
string Msg;
sprintf(Msg, "Value #%d: %d\n", TabNr, CheckBoxValue[TabNr]);
dlgMessageBox(Msg);
}
}
}
}
};
dlgTextEdit
See also dlgStringEdit,
dlgTextView,
dlgLabel,
Layout Information,
A Complete Example
Example
string Text = "This is some text.\nLine 2\nLine 3";
dlgVBoxLayout {
dlgLabel("&Edit the text");
dlgTextEdit(Text);
}
dlgTextView
See also dlgTextEdit,
dlgLabel,
Layout Information,
A Complete Example
dlgTextView(string Text, string &Link) statement
Example
string Text = "This is some text.\nLine 2\nLine 3";
dlgVBoxLayout {
dlgLabel("&View the text");
dlgTextView(Text);
}
dlgVBoxLayout
See also dlgGridLayout,
dlgHBoxLayout,
Layout Information,
A Complete Example
Example
dlgVBoxLayout {
dlgLabel("Box 1");
dlgLabel("Box 2");
dlgLabel("Box 3");
}
Layout Information
All objects within a User Language Dialog a placed inside a layout context.
Grid Layout Context
Objects in a grid layout context must specify the grid coordinates of the cell or cells into
which they shall be placed. To place a text label at row 5, column 2, you would write
dlgGridLayout {
dlgCell(5, 2) dlgLabel("Text");
}
If the object shall span over more than one cell you need to specify the coordinates of the
starting cell and the ending cell. To place a group that extends from row 1, column 2 up to row 3,
column 5, you would write
dlgGridLayout {
dlgCell(1, 2, 3, 5) dlgGroup("Title") {
//...
}
}
Horizontal Layout Context
Objects in a horizontal layout context are placed left to right.
dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK") dlgAccept();
dlgPushButton("Cancel") dlgReject();
}
Vertical Layout Context
Objects in a vertical layout context follow the same rules as those in a horizontal
layout context, except that they are placed top to bottom.
Mixing Layout Contexts
Vertical, horizontal and grid layout contexts can be mixed to create the desired layout
structure of a dialog.
See the Complete Example for a demonstration of this.
Dialog Functions
The following functions can be used with User Language Dialogs:
dlgAccept() closes the dialog and accepts its contents dlgRedisplay() immediately redisplays the dialog after changes to any values dlgReset() resets all dialog objects to their initial values dlgReject() closes the dialog and rejects its contents dlgSelectionChanged() tells whether the current selection in a dlgListView or dlgListBox has changed dlgAccept()
See also dlgReject,
dlgDialog,
A Complete Example
dlgPushButton("OK") {
dlgAccept();
dlgMessageBox("Accepting!");
}
the statement after dlgAccept() will still be executed!
Example
int Result = dlgDialog("Test") {
dlgPushButton("+OK") dlgAccept(42);
dlgPushButton("Cancel") dlgReject();
};
dlgRedisplay()
See also dlgReset,
dlgDialog,
A Complete Example
Example
string Status = "Idle";
int Result = dlgDialog("Test") {
dlgLabel(Status, 1); // note the '1' to tell the label to be updated!
dlgPushButton("+OK") dlgAccept(42);
dlgPushButton("Cancel") dlgReject();
dlgPushButton("Run") {
Status = "Running...";
dlgRedisplay();
// some program action here...
Status = "Finished.";
}
};
dlgReset()
See also dlgReject,
dlgDialog,
A Complete Example
Example
int Number = 1;
int Result = dlgDialog("Test") {
dlgIntEdit(Number);
dlgPushButton("+OK") dlgAccept(42);
dlgPushButton("Cancel") dlgReject();
dlgPushButton("Reset") dlgReset();
};
dlgReject()
See also dlgAccept,
dlgReset,
dlgDialog,
A Complete Example
dlgPushButton("Cancel") {
dlgReject();
dlgMessageBox("Rejecting!");
}
the statement after dlgReject() will still be executed!
Example
int Result = dlgDialog("Test") {
dlgPushButton("+OK") dlgAccept(42);
dlgPushButton("Cancel") dlgReject();
};
dlgSelectionChanged()
See also dlgListView,
dlgListBox
Example
string Colors[] = { "red\tThe color RED", "green\tThe color GREEN", "blue\tThe color BLUE" };
int Selected = 0; // initially selects "red"
string MyColor;
dlgLabel(MyColor, 1);
dlgListView("Name\tDescription", Colors, Selected) {
if (dlgSelectionChanged())
MyColor = Colors[Selected];
else
dlgMessageBox("You have chosen " + Colors[Selected]);
}
Escape Character
Some characters have special meanings in button
or label texts, so they need to be escaped if they shall appear literally.
dlgLabel("Miller \\& Co.");
This will result in "Miller & Co." displayed in the dialog.
A Complete Example
Here's a complete example of a User Language Dialog.
int hor = 1;
int ver = 1;
string fileName;
int Result = dlgDialog("Enter Parameters") {
dlgHBoxLayout {
dlgStretch(1);
dlgLabel("This is a simple dialog");
dlgStretch(1);
}
dlgHBoxLayout {
dlgGroup("Horizontal") {
dlgRadioButton("&Top", hor);
dlgRadioButton("&Center", hor);
dlgRadioButton("&Bottom", hor);
}
dlgGroup("Vertical") {
dlgRadioButton("&Left", ver);
dlgRadioButton("C&enter", ver);
dlgRadioButton("&Right", ver);
}
}
dlgHBoxLayout {
dlgLabel("File &name:");
dlgStringEdit(fileName);
dlgPushButton("Bro&wse") {
fileName = dlgFileOpen("Select a file", fileName);
}
}
dlgGridLayout {
dlgCell(0, 0) dlgLabel("Row 0/Col 0");
dlgCell(1, 0) dlgLabel("Row 1/Col 0");
dlgCell(0, 1) dlgLabel("Row 0/Col 1");
dlgCell(1, 1) dlgLabel("Row 1/Col 1");
}
dlgSpacing(10);
dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK") dlgAccept();
dlgPushButton("Cancel") dlgReject();
}
};
Supported HTML tags
EAGLE supports a subset of the tags used to format HTML pages.
This can be used to format the text of several User Language Dialog objects,
in the #usage directive or in the description
of library objects.
Tag Description <html>...</html> An HTML document. <body>...</body> The body of an HTML document. It understands the following attribute
<h1>...</h1> A top-level heading. <h2>...</h2> A sub-level heading. <h3>...</h3> A sub-sub-level heading. <p>...</p> A left-aligned paragraph. Adjust the alignment with the align attribute. Possible values are left, right and center. <center>...</center> A centered paragraph. <blockquote>...</blockquote> An indented paragraph, useful for quotes. <ul>...</ul> An un-ordered list. You can also pass a type argument to define the bullet style. The default is type=disc, other types are circle and square. <ol>...</ol> An ordered list. You can also pass a type argument to define the enumeration label style. The default is type="1", other types are "a" and "A". <li>...</li> A list item. This tag can only be used within the context of ol or ul. <pre>...</pre> For larger chunks of code. Whitespaces in the contents are preserved. For small bits of code, use the inline-style code. <a>...</a> An anchor or link. It understands the following attributes:
<em>...</em> Emphasized (same as <i>...</i>). <strong>...</strong> Strong (same as <b>...</b>). <i>...</i> Italic font style. <b>...</b> Bold font style. <u>...</u> Underlined font style. <big>...</big> A larger font size. <small>...</small> A smaller font size. <code>...</code> Indicates Code. (same as <tt>...</tt>. For larger chunks of code, use the block-tag pre. <tt>...</tt> Typewriter font style. <font>...</font> Customizes the font size, family and text color. The tag understands the following attributes:
<img...> An image. This tag understands the following attributes:
The URL of the image may be external, as in <img src="http://web.cadsoft.de/cslogo.gif">.
<hr> A horizonal line. <br> A line break. <nobr>...</nobr> No break. Prevents word wrap. <table>...</table> A table definition.
The default table is frameless. Specify the boolean attribute
border in order to get a frame. Other attributes are:
<tr>...</tr> A table row. Can only be used within table. Understands the attribute
<td>...</td> A table data cell. Can only be used within tr. Understands the attributes
<th>...</th> A table header cell. Like td but defaults to center-alignment and a bold font. <author>...</author> Marks the author of this text. <dl>...</dl> A definition list. <dt>...</dt> A definition tag. Can only be used within dl. <dd>...</dd> Definition data. Can only be used within dl.
Tag Meaning < < > > & & non-breaking space ä ä ö ö ü ü Ä Ä Ö Ö Ü Ü ß ß © © ° ° µ µ ± ± " " Automatic Backup
Maximum backup level
The WRITE command creates backup copies of the saved files.
These backups have the same name as the original file, with a
modified extension that follows the pattern
.x#n
In this pattern 'x' is replaced by the character
's' for schematic files
'l' for library files
Auto backup interval
If a drawing has been modified a safety backup copy will be automatically
created after at most the given Auto backup interval.
.x##
In this pattern 'x' is replaced by the character
's' for schematic files
'l' for library files
File Locking
EAGLE supports a simple file locking mechanism.
All files loaded in an EAGLE drawing editor or the text editor are locked for writing by default.
The lock is released as soon as the editor is closed or another file is loaded.
Forward&Back Annotation
A schematic and board file are logically interconnected through automatic
Forward&Back Annotation. Normally there are no special things to be
considered about Forward&Back Annotation. This section, however, lists all of the
details about what exactly happens during f/b activities:
Consistency Check
In order to use Forward&Back Annotation a board and schematic
must be consistent, which means they must contain an equivalent set of
parts/elements and nets/signals.
Making a Board and Schematic consistent
To make an inconsistent pair of board and schematic files consistent, you
have to manually fix any inconsistency listed in the ERC protocol.
This can be done by applying editor commands like
NAME,
VALUE,
PINSWAP,
REPLACE etc.
After fixing the inconsistencies you must use the
ERC command again to check the files and
eventually activate Forward&Back Annotation.
Note on Attributes:
Use ATTRIBUTE for creating consistent names and values again.
If there are attributes that are defined in the library, it might be helpful to use the
REPLACE command in order to replace such components and update
the attribute information.
Note on Package variants:
Several approaches:
Tolerated part/element and net/signal deviations
Beside elements without Pads or Smds EAGLE tolerates also additional elements with Pads/Smds
as long as they are not connected to any signal.
Signals without net counterpart are tolerated as long as they have no connection to a Pad/Smd
(this is useful for wires in a copper layer without electrical meaning).
Limitations
The following actions are not allowed in a board when Back Annotation
is active (i.e. the schematic is loaded, too):
If you try to do one of the above things, you will receive a message
telling you that this operation cannot be backannotated. In such a
case please do the necessary operations in the schematic (they will
then be forward annotated to the board). If you absolutely have to
do it in the board, you can close the schematic window and then do
anything you like inside the board. In that case, however, you risk loosing consistency.
License
To legally use EAGLE you need a registered user license.
Please check whether the dialog "Help/About EAGLE" contains your name and address
under "Registered to:".
If you have any doubts about the validity or authenticity of your license,
please contact our Technical Support staff for verification.
Under Mac OS X you can find this information under "EAGLE/About EAGLE".
Single-User License
Only one user may use the program at any given time.
However, that user may install the program on any of his computers, as long
as he makes sure that the program will only be used on one of these
computers at a time.
Multi-user License
A multi-user license may be used by several users (up to the maximum number
listed on the license) simultaneously. The program may be installed on any
number of different computers at the location of the license holder.
Commercial License
The program may be used for any purpose, be it commercial or private.
Educational License
The program may only be used in an educational environment like a school,
university or training workshop, in order to teach how to use ECAD
software.
Student License
The program may only be used for private ("non-profit") purposes.
Student versions are sold at a very low price, to allow people who
could otherwise never afford buying EAGLE the use of the program
for their private hobby or education. It is a violation of the license
terms if you "earn money" by using a Student Licence of EAGLE.
EAGLE Editions
EAGLE is available in different editions to fit various
user requirements.
Ultimate
The Ultimate edition provides full functionality:
Premium
The Premium edition has the following limitations:
Maker
The Maker edition has the following limitations:
Standard
The Standard edition has the following limitations: