Many actions take a delta parameter as the last parameter, which is an amount to change something.  That delta may include units, as an additional parameter, such as Action(Object,5,mm). If no units are specified, the default is PCB's native units (currently 1/100 mil).  Also, if the delta is prefixed by + or -, the size is increased or decreased by that amount. Otherwise, the size size is set to the given amount.

     Action(Object,5,mil)
     Action(Object,+0.5,mm)
     Action(Object,-1)

Actions which take a delta parameter which do not accept all these options will specify what they do take.

Many actions act on indicated objects on the board.  They will have parameters like ToggleObject or SelectedVias to indicate what group of objects they act on.  Unless otherwise specified, these parameters are defined as follows:

Object
ToggleObject
     Affects the object under the mouse pointer.  If this action is invoked from a menu or script, the user will be prompted to click on an object, which is then the object affected.

Selected
SelectedObjects

     Affects all objects which are currently selected.  At least, all selected objects for which the given action makes sense.

SelectedPins
SelectedVias
SelectedTYPE
etc
     Affects all objects which are both selected and of the TYPE specified.

Core actions
============

AddRats
-------

     AddRats(AllRats|SelectedRats|Close) format

Add one or more rat lines to the board.

AllRats
     Create rat lines for all loaded nets that aren't already connected on with copper.

SelectedRats
     Similarly, but only add rat lines for nets connected to selected pins and pads.

Close
     Selects the shortest unselected rat on the board.

ApplyVendor
-----------

     ApplyVendor() format

Applies the currently loaded vendor drill table to the current design.

This will modify all of your drill holes to match the list of allowed sizes for your vendor.

Atomic
------

     Atomic(Save|Restore|Close|Block) format

Save or restore the undo serial number.

This action allows making multiple-action bindings into an atomic operation that will be undone by a single Undo command.  For example, to optimize rat lines, you'd delete the rats and re-add them.  To group these into a single undo, you'd want the deletions and the additions to have the same undo serial number.  So, you Save, delete the rats, Restore, add the rats - using the same serial number as the deletes, then Block, which checks to see if the deletions or additions actually did anything.  If not, the serial number is set to the saved number, as there's nothing to undo.  If something did happen, the serial number is incremented so that these actions are counted as a single undo step.

Save
     Saves the undo serial number.

Restore
     Returns it to the last saved number.

Close
     Sets it to 1 greater than the last save.

Block
     Does a Restore if there was nothing to undo, else does a Close.

AutoPlaceSelected
-----------------

     AutoPlaceSelected() format

Auto-place selected components.

Attempts to re-arrange the selected components such that the nets connecting them are minimized.  Note that you cannot undo this.

AutoRoute
---------

     AutoRoute(AllRats|SelectedRats) format

Auto-route some or all rat lines.

AllRats
     Attempt to autoroute all rats.

SelectedRats
     Attempt to autoroute the selected rats.

Before autorouting, it's important to set up a few things.  First, make sure any layers you aren't using are disabled, else the autorouter may use them.  Next, make sure the current line and via styles are set accordingly.  Last, make sure "new lines clear polygons" is set, in case you eventually want to add a copper pour.

Autorouting takes a while.  During this time, the program may not be responsive.

ChangeClearSize
---------------

     ChangeClearSize(Object, delta)
     ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta)
     ChangeClearSize(SelectedLines|SelectedArcs, delta
     ChangeClearSize(Selected|SelectedObjects, delta) format

Changes the clearance size of objects.

If the solder mask is currently showing, this action changes the solder mask clearance.  If the mask is not showing, this action changes the polygon clearance.

ChangeDrillSize
---------------

     ChangeDrillSize(Object, delta)
     ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta) format

Changes the drilling hole size of objects.

ChangeFlag
----------

     ChangeFlag(Object|Selected|SelectedObjects, flag, value)
     ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)
     ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)
     ChangeFlag(SelectedElements, flag, value)
     flag = square | octagon | thermal | join
     value = 0 | 1 format

Sets or clears flags on objects.

Toggles the given flag on the indicated object(s).  The flag may be one of the flags listed above (square, octagon, thermal, join).  The value may be the number 0 or 1.  If the value is 0, the flag is cleared.  If the value is 1, the flag is set.

ChangeHole
----------

     ChangeHole(ToggleObject|Object|SelectedVias|Selected) format

Changes the hole flag of objects.

The "hole flag" of a via determines whether the via is a plated-through hole (not set), or an unplated hole (set).

ChangeJoin
----------

     ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected) format

Changes the join (clearance through polygons) of objects.

The join flag determines whether a line or arc, drawn to intersect a polygon, electrically connects to the polygon or not.  When joined, the line/arc is simply drawn over the polygon, making an electrical connection.  When not joined, a gap is drawn between the line and the polygon, insulating them from each other.

ChangeName
----------

     ChangeName(Object)
     ChangeName(Layout|Layer) format

Sets the name of objects.

Object
     Changes the name of the element under the cursor.

Layout
     Changes the name of the layout.  This is printed on the fab drawings.

Layer
     Changes the name of the currently active layer.

ChangeOctagon
-------------

     ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected)
     ChangeOctagon(SelectedElements|SelectedPins|SelectedVias) format

Changes the octagon-flag of pins and vias.

Pins, pads, and vias can have various shapes.  All may be round.  Pins
and pads may be square (obviously "square" pads are usually
rectangular).  Pins and vias may be octagonal.  When you change a
shape flag of an element, you actually change all of its pins and
pads.

Note that the square flag takes precedence over the octagon flag,
thus, if both the square and octagon flags are set, the object is
square.  When the square flag is cleared, the pins and pads will be
either round or, if the octagon flag is set, octagonal.

ChangePinName
-------------

     ChangePinName(ElementName,PinNumber,PinName) format

Sets the name of a specific pin on a specific element.

This can be especially useful for annotating pin names from a schematic to the layout without requiring knowledge of the pcb file format.

     ChangePinName(U3, 7, VCC)

ChangeSize
----------

     ChangeSize(Object, delta)
     ChangeSize(SelectedObjects|Selected, delta)
     ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta)
     ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta)
     ChangeSize(SelectedElements, delta) format

Changes the size of objects.

For lines and arcs, this changes the width.  For pins and vias, this changes the overall diameter of the copper annulus.  For pads, this changes the width and, indirectly, the length.  For texts and names, this changes the scaling factor.  For elements, this changes the width of the silk layer lines and arcs for this element.

ChangeSquare
------------

     ChangeSquare(ToggleObject)
     ChangeSquare(SelectedElements|SelectedPins)
     ChangeSquare(Selected|SelectedObjects) format

Changes the square flag of pins and pads.

Note that Pins means both pins and pads.

Pins, pads, and vias can have various shapes.  All may be round.  Pins
and pads may be square (obviously "square" pads are usually
rectangular).  Pins and vias may be octagonal.  When you change a
shape flag of an element, you actually change all of its pins and
pads.

Note that the square flag takes precedence over the octagon flag,
thus, if both the square and octagon flags are set, the object is
square.  When the square flag is cleared, the pins and pads will be
either round or, if the octagon flag is set, octagonal.

ClearOctagon
------------

     ClearOctagon(ToggleObject|Object|SelectedObjects|Selected)
     ClearOctagon(SelectedElements|SelectedPins|SelectedVias) format

Clears the octagon-flag of pins and vias.

Pins, pads, and vias can have various shapes.  All may be round.  Pins
and pads may be square (obviously "square" pads are usually
rectangular).  Pins and vias may be octagonal.  When you change a
shape flag of an element, you actually change all of its pins and
pads.

Note that the square flag takes precedence over the octagon flag,
thus, if both the square and octagon flags are set, the object is
square.  When the square flag is cleared, the pins and pads will be
either round or, if the octagon flag is set, octagonal.

ClearSquare
-----------

     ClearSquare(ToggleObject|SelectedElements|SelectedPins) format

Clears the square-flag of pins and pads.

Note that Pins means pins and pads.

Pins, pads, and vias can have various shapes.  All may be round.  Pins
and pads may be square (obviously "square" pads are usually
rectangular).  Pins and vias may be octagonal.  When you change a
shape flag of an element, you actually change all of its pins and
pads.

Note that the square flag takes precedence over the octagon flag,
thus, if both the square and octagon flags are set, the object is
square.  When the square flag is cleared, the pins and pads will be
either round or, if the octagon flag is set, octagonal.

ClearThermal
------------

     ClearThermal(Object|SelectedPins|SelectedVias|Selected|SelectedElements) format

Clear a thermal (on the current layer) to pins or vias.

This removes any electrical connection.  Pins and vias that do not already have thermals are not changed.

ClrFlag
-------

     ClrFlag(Object|Selected|SelectedObjects, flag)
     ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag)
     ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
     ClrFlag(SelectedElements, flag)
     flag = square | octagon | thermal | join format

Clears flags on objects.

Turns the given flag off, regardless of its previous setting.  See ChangeFlag.

     ClrFlag(SelectedLines,join)

Connection
----------

     Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset) format

Searches connections of the object at the cursor position.

Connections found with this action will be highlighted in the ``connected-color'' color and will have the ``found'' flag set.

Find
     The net under the cursor is ``found''.

ResetLinesAndPolygons
     Any ``found'' lines and polygons are marked ``not found''.

ResetPinsAndVias
     Any ``found'' pins and vias are marked ``not found''.

Reset
     All ``found'' objects are marked ``not found''.

DeleteRats
----------

     DeleteRats(AllRats|Selected|SelectedRats) format

Delete rat lines.

DisableVendor
-------------

     DisableVendor() format

Disables automatic drill size mapping.

When drill mapping is enabled, new instances of pins and vias will have their drill holes mapped to one of the allowed drill sizes specified in the currently loaded vendor drill table.

DisperseElements
----------------

     DisperseElements(All|Selected) format

Disperses elements.

Normally this is used when starting a board, by selecting all elements and then dispersing them.  This scatters the elements around the board so that you can pick individual ones, rather than have all the elements at the same 0,0 coordinate and thus impossible to choose from.

Display
-------

     Display(NameOnPCB|Description|Value)
     Display(Grid|Redraw)
     Display(CycleClip|Toggle45Degree|ToggleStartDirection)
     Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames)
     Display(ToggleMask|ToggleName|ToggleClearLine|ToggleSnapPin)
     Display(ToggleThindraw|ToggleOrthoMove|ToggleLocalRef)
     Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)
     Display(ToggleLiveRoute)
     Display(Pinout|PinOrPadName)
     Display(Scroll, Direction) format

Several display-related actions.

NameOnPCB

Description

Value
     Specify whether all elements show their name, description, or value.

Redraw
     Redraw the whole board.

Toggle45Degree
     When clear, lines can be drawn at any angle.  When set, lines are restricted to multiples of 45 degrees and requested lines may be broken up according to the clip setting.

CycleClip
     Changes the way lines are restricted to 45 degree increments.  The various settings are: straight only, orthogonal then angled, and angled then orthogonal.  If AllDirections is set, this action disables it.

ToggleRubberBandMode
     If set, moving an object moves all the lines attached to it too.

ToggleStartDirection
     If set, each time you set a point in a line, the Clip toggles between orth-angle and angle-ortho.

ToggleUniqueNames
     If set, you will not be permitted to change the name of an element to match that of another element.

ToggleSnapPin
     If set, pin centers and pad end points are treated as additional grid points that the cursor can snap to.

ToggleLocalRef
     If set, the mark is automatically set to the beginning of any move, so you can see the relative distance you've moved.

ToggleThindraw
     If set, objects on the screen are drawn as outlines (lines are drawn as center-lines).  This lets you see line endpoints hidden under pins, for example.

ToggleShowDRC
     If set, pending objects (i.e. lines you're in the process of drawing) will be drawn with an outline showing how far away from other copper you need to be.

ToggleLiveRoute
     If set, the progress of the autorouter will be visible on the screen.

ToggleAutoDRC
     If set, you will not be permitted to make connections which violate the current DRC and netlist settings.

ToggleCheckPlanes
     If set, lines and arcs aren't drawn, which usually leaves just the polygons.  If you also disable all but the layer you're interested in, this allows you to check for isolated regions.

ToggleOrthoMove
     If set, the crosshair is only allowed to move orthogonally from its previous position.  I.e. you can move an element or line up, down, left, or right, but not up+left or down+right.

ToggleName
     Selects whether the pinouts show the pin names or the pin numbers.

ToggleMask
     Turns the solder mask on or off.

ToggleClearLine
     When set, the clear-line flag causes new lines and arcs to have their ``clear polygons'' flag set, so they won't be electrically connected to any polygons they overlap.

ToggleGrid
     Resets the origin of the current grid to be wherever the mouse pointer is (not where the crosshair currently is).  If you provide two numbers after this, the origin is set to that coordinate.  The numbers are in PCB internal units, currently 1/100 mil.

Grid
     Toggles whether the grid is displayed or not.

Pinout
     Causes the pinout of the element indicated by the cursor to be displayed, usually in a separate window.

PinOrPadName
     Toggles whether the names of pins, pads, or (yes) vias will be displayed.  If the cursor is over an element, all of its pins and pads are affected.

Scroll <direction>
     Scrolls the viewport in the given direction, with 1=down/left, 2=down, etc, according to the numeric keypad layout.

djopt
-----

     djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull)
     djopt(auto) - all of the above
     djopt(miter) format

Perform various optimizations on the current board

The different types of optimizations change your board in order to reduce the total trace length and via count.

debumpify
     Looks for U-shaped traces that can be shortened or eliminated.

unjaggy
     Looks for corners which could be flipped to eliminate one or more corners (i.e. jaggy lines become simpler).

simple
     Removing uneeded vias, replacing two or more trace segments in a row with a single segment.  This is usually performed automatically after other optimizations.

vianudge
     Looks for vias where all traces leave in the same direction.  Tries to move via in that direction to eliminate one of the traces (and thus a corner).

viatrim
     Looks for traces that go from via to via, where moving that trace to a different layer eliminates one or both vias.

orthopull
     Looks for chains of traces all going in one direction, with more traces orthogonal on one side than on the other.  Moves the chain in that direction, causing a net reduction in trace length, possibly eliminating traces and/or corners.

auto
     Performs the above options, repeating until no further optimizations can be made.

miter
     Replaces 90 degree corners with a pair of 45 degree corners, to reduce RF losses and trace length.

DRC
---

     DRC() format

Invoke the DRC check.

Note that the design rule check uses the current board rule settings, not the current style settings.

DumpLibrary
-----------

     DumpLibrary() format

Display the entire contents of the libraries.

EnableVendor
------------

     EnableVendor() format

Enables automatic drill size mapping.

When drill mapping is enabled, new instances of pins and vias will have their drill holes mapped to one of the allowed drill sizes specified in the currently loaded vendor drill table.  To enable drill mapping, a vendor resource file containing a drill table must be loaded first.

ExecuteFile
-----------

     ExecuteFile(filename) format

Run actions from the given file.

Lines starting with # are ignored.

Flip
----

     Flip(Object|Selected|SelectedElements) format

Flip an element to the opposite side of the board.

Note that the location of the element will be symmetric about the cursor location; i.e. if the part you are pointing at will still be at the same spot once the element is on the other side.  When flipping multiple elements, this retains their positions relative to each other, not their absolute positions on the board.

FontEdit
--------

     FontEdit() format

Convert the current font to a PCB for editing

FontSave
--------

     FontSave() format

Convert the current PCB back to a font

h
-

     h format

Print a help message for commands.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

l
-

     l [name] format

Loads layout data.

Loads a new datafile (layout) and, if confirmed, overwrites any existing unsaved data.  The filename and the searchpath (filePath) are passed to the command defined by fileCommand.  If no filename is specified a file select box will popup.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

le
--

     le [name] format

Loads an element into the current buffer.

The filename and the searchpath (elementPath) are passed to the command defined by elementCommand.  If no filename is specified a file select box will popup.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

LoadFrom
--------

     LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename) format

Load layout data from a file.

This action assumes you know what the filename is.  The various GUIs should have a similar Load action where the filename is optional, and will provide their own file selection mechanism to let you choose the file name.

Layout
     Loads an entire PCB layout, replacing the current one.

LayoutToBuffer
     Loads an entire PCB layout to the paste buffer.

ElementToBuffer
     Loads the given element file into the paste buffer.  Element files contain only a single Element definition, such as the ``newlib'' library uses.

Netlist
     Loads a new netlist, replacing any current netlist.

Revert
     Re-loads the current layout from its disk file, reverting any changes you may have made.

LoadVendorFrom
--------------

     LoadVendorFrom(filename) format

Loads the specified vendor resource file.

filename
     Name of the vendor resource file.  If not specified, the user will be prompted to enter one.

m
-

     m [name] format

Loads a layout into the current buffer.

The filename and the searchpath (filePath) are passed to the command defined by fileCommand. If no filename is specified a file select box will popup.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

MarkCrosshair
-------------

     MarkCrosshair()
     MarkCrosshair(Center) format

Set/Reset the Crosshair mark

The ``mark'' is a small X-shaped target on the display which is treated like a second origin (the normal origin is the upper let corner of the board).  The GUI will display a second set of coordinates for this mark, which tells you how far you are from it.

If no argument is given, the mark is toggled - disabled if it was enabled, or enabled at the current cursor position of disabled.  If the Center argument is given, the mark is moved to the current cursor location.

Message
-------

     Message(message) format

Writes a message to the log window.

This action displays a message to the log window.  This action is primarily provided for use by other programs which may interface with PCB.  If multiple arguments are given, each one is sent to the log window followed by a newline.

Mode
----

     Mode(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
     Mode(Polygon|Rectangle|Remove|Rotate|Text|Thermal|Via)
     Mode(Notify|Release|Cancel|Stroke)
     Mode(Save|Restore) format

Change or use the tool mode.

Arc
Arrow
Copy
InsertPoint
Line
Lock
Move
None
PasteBuffer
Polygon
Rectangle
Remove
Rotate
Text
Thermal
Via
     Select the indicated tool.

Notify
     Called when you press the mouse button, or move the mouse.

Release
     Called when you release the mouse button.

Cancel
     Cancels any pending tool activity, allowing you to restart elsewhere. For example, this allows you to start a new line rather than attach a line to the previous line.

Stroke
     If your pcb was built with libstroke, this invokes the stroke input method.  If not, this will restart a drawing mode if you were drawing, else it will select objects.

Save
     Remembers the current tool.

Restore
     Restores the tool to the last saved tool.

MoveObject
----------

     MoveObject(X,Y,dim) format

Moves the object under the crosshair.

The X and Y are treated like delta is for many other objects.  For each, if it's prefixed by + or -, then that amount is relative.  Otherwise, it's absolute.  Units can be mil or mm; if unspecified, units are PCB's internal units, currently 1/100 mil.

MoveToCurrentLayer
------------------

     MoveToCurrentLayer(Object|SelectedObjects) format

Moves objects to the current layer.

Note that moving an element from a component layer to a solder layer, or from solder to component, won't automatically flip it.  Use the Flip() action to do that.

Netlist
-------

     Net(find|select|rats|norats[,net[,pin]]) format

Perform various actions on netlists.

Each of these actions apply to a specified set of nets.  NET and PIN are patterns which match one or more nets or pins; these patterns may be full names or regular expressions.  If an exact match is found, it is the only match; if no exact match is found, then the pattern is tried as a regular expression.

If neither NET nor PIN are specified, all nets apply.  If NET is specified but not PIN, all nets matching NET apply.  If both are specified, nets which match NET and contain a pin matching PIN apply.

find
     Nets which apply are marked found and are drawn in the connected-color color.

select
     Nets which apply are selected.

rats
     Nets which apply are marked as available for the rats nest.

norats
     Nets which apply are marked as not available for the rats nest.

New
---

     New([name]) format

Starts a new layout.

If a name is not given, one is prompted for.

OptAutoOnly
-----------

     OptAutoOnly() format

Toggles the optimize-only-autorouted flag.

The original purpose of the trace optimizer was to clean up the traces created by the various autorouters that have been used with PCB.  When a board has a mix of autorouted and carefully hand-routed traces, you don't normally want the optimizer to move your hand-routed traces. But, sometimes you do.  By default, the optimizer only optimizes autorouted traces.  This action toggles that setting, so that you can optimize hand-routed traces also.

PasteBuffer
-----------

     PasteBuffer(AddSelected|Clear|1..MAX_BUFFER)
     PasteBuffer(Rotate, 1..3)
     PasteBuffer(Convert|Save|Restore|Mirror)
     PasteBuffer(ToLayout, X, Y, units) format

Various operations on the paste buffer.

There are a number of paste buffers; the actual limit is a compile-time constant MAX_BUFFER in globalconst.h.  It is currently 5.  One of these is the ``current'' paste buffer, often referred to as ``the'' paste buffer.

AddSelected
     Copies the selected objects to the current paste buffer.

Clear
     Remove all objects from the current paste buffer.

Convert
     Convert the current paste buffer to an element.  Vias are converted to pins, lines are converted to pads.

Restore
     Convert any elements in the paste buffer back to vias and lines.

Mirror
     Flip all objects in the paste buffer vertically (up/down flip).  To mirror horizontally, combine this with rotations.

Rotate
     Rotates the current buffer.  The number to pass is 1..3, where 1 means 90 degrees counter clockwise, 2 means 180 degrees, and 3 means 90 degrees clockwise (270 CCW).

Save
     Saves any elements in the current buffer to the indicated file.

ToLayout
     Pastes any elements in the current buffer to the indicated X, Y coordinates in the layout.  The X and Y are treated like delta is for many other objects.  For each, if it's prefixed by + or -, then that amount is relative to the last location.  Otherwise, it's absolute.  Units can be mil or mm; if unspecified, units are PCB's internal units, currently 1/100 mil.

1..MAX_BUFFER
     Selects the given buffer to be the current paste buffer.

Polygon
-------

     Polygon(Close|PreviousPoint) format

Some polygon related stuff.

Polygons need a special action routine to make life easier.

Close
     Creates the final segment of the polygon.  This may fail if clipping to 45 degree lines is switched on, in which case a warning is issued.

PreviousPoint
     Resets the newly entered corner to the previous one. The Undo action will call Polygon(PreviousPoint) when appropriate to do so.

Puller
------

     Puller() format

Pull an arc-line junction tight.

The Puller() action is a special-purpose optimization.  When invoked while the crosshair is over the junction of an arc and a line, it will adjust the arc's angle and the connecting line's endpoint such that the line intersects the arc at a tangent.  In the example below, the left side is ``before'' with the black target marking where to put the crosshair:

Example of how puller works

The right side is ``after'' with the black target marking where the arc-line intersection was moved to.

q
-

     q format

Quits the application after confirming.

Note that this command doesn't save your layout.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

q!
--

     q! format

Quits the application without confirming.

Note that this command neither saves your data nor prompts for confirmation.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

Quit
----

     Quit() format

Quits the application.

If you have unsaved changes, you will be prompted to confirm before quitting.

Redo
----

     Redo() format

Redo recent``undo''operations.

This routine allows you to recover from the last undo command.  You might want to do this if you thought that undo was going to revert something other than what it actually did (in case you are confused about which operations are un-doable), or if you have been backing up through a long undo list and over-shoot your stopping point.  Any change that is made since the undo in question will trim the redo list.  For example if you add ten lines, then undo three of them you could use redo to put them back, but if you move a line on the board before performing the redo, you will lose the ability to "redo" the three "undone" lines.

RemoveSelected
--------------

     RemoveSelected() format

Removes any selected objects.

Renumber
--------

     Renumber()
     Renumber(filename) format

Renumber all elements.  The changes will be recorded to filename for use in backannotating these changes to the schematic.

Report
------

     Report(Object|DrillReport|FoundPins) format

Produce various report.

Object
     The object under the crosshair will be reported, describing various aspects of the object.

DrillReport
     A report summarizing the number of drill sizes used, and how many of each, will be produced.

FoundPins
     A report listing all pins and pads which are marked as ``found'' will be produced.

ReportDialog
------------

     ReportDialog() format

Report on the object under the crosshair

This is a shortcut for Report(Object).

RipUp
-----

     RipUp(All|Selected|Element) format

Ripup auto-routed tracks, or convert an element to parts.

All
     Removes all lines and vias which were created by the autorouter.

Selected
     Removes all selected lines and vias which were created by the autorouter.

Element
     Converts the element under the cursor to parts (vias and lines).  Note that this uses the highest numbered paste buffer.

rn
--

     rn [name] format

Reads netlist.

If no filename is given a file select box will pop up.  The file is read via the command defined by the RatCommand resource. The command must send its output to stdout.

Netlists are used for generating rat's nests (see Rats Nest) and for verifying the board layout (which is also accomplished by the Ratsnest command).

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

RouteStyle
----------

     RouteStyle(1|2|3|4) format

Copies the indicated routing style into the current sizes.

s
-

     s [name] format

Saves layout data.

Data and the filename are passed to the command defined by the resource saveCommand. It must read the layout data from stdin.  If no filename is entered, either the last one is used again or, if it is not available, a file select box will pop up.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

SaveTo
------

     SaveTo(Layout|LayoutAs,filename)
     SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename) format

Saves data to a file.

Layout
     Saves the current layout.

LayoutAs
     Saves the current layout, and remembers the filename used.

AllConnections
     Save all connections to a file.

AllUnusedPins
     List all unused pins to a file.

ElementConnections
     Save connections to the element at the cursor to a file.

Select
------

     Select(ToggleObject)
     Select(All|Block|Connection)
     Select(ElementByName|ObjectByName|PadByName|PinByName)
     Select(ElementByName|ObjectByName|PadByName|PinByName, Name)
     Select(TextByName|ViaByName)
     Select(TextByName|ViaByName, Name)
     Select(Convert) format

Toggles or sets the selection

ElementByName

ObjectByName

PadByName

PinByName

TextByName

ViaByName

     These all rely on having a regular expression parser built into pcb.  If the name is not specified then the user is prompted for a pattern, and all objects that match the pattern and are of the type specified are selected.

Object

ToggleObject
     Selects the object under the cursor.

Block
     Selects all objects in a rectangle indicated by the cursor.

All
     Selects all objects on the board.

Connection
     Selects all connections with the ``found'' flag set.

Convert
     Converts the selected objects to an element.  This uses the highest numbered paste buffer.

SetFlag
-------

     SetFlag(Object|Selected|SelectedObjects, flag)
     SetFlag(SelectedLines|SelectedPins|SelectedVias, flag)
     SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag)
     SetFlag(SelectedElements, flag)
     flag = square | octagon | thermal | join format

Sets flags on objects.

Turns the given flag on, regardless of its previous setting.  See ChangeFlag.

     SetFlag(SelectedPins,thermal)

SetOctagon
----------

     SetOctagon(Object|ToggleObject|SelectedElements|Selected) format

Sets the octagon-flag of objects.

Pins, pads, and vias can have various shapes.  All may be round.  Pins
and pads may be square (obviously "square" pads are usually
rectangular).  Pins and vias may be octagonal.  When you change a
shape flag of an element, you actually change all of its pins and
pads.

Note that the square flag takes precedence over the octagon flag,
thus, if both the square and octagon flags are set, the object is
square.  When the square flag is cleared, the pins and pads will be
either round or, if the octagon flag is set, octagonal.

SetSame
-------

     SetSame() format

Sets current layer and sizes to match indicated item.

When invoked over any line, arc, polygon, or via, this changes the current layer to be the layer that item is on, and changes the current sizes (thickness, keepaway, drill, etc) according to that item.

SetSquare
---------

     SetSquare(ToggleObject|SelectedElements|SelectedPins) format

sets the square-flag of objects.

Note that Pins means pins and pads.

Pins, pads, and vias can have various shapes.  All may be round.  Pins
and pads may be square (obviously "square" pads are usually
rectangular).  Pins and vias may be octagonal.  When you change a
shape flag of an element, you actually change all of its pins and
pads.

Note that the square flag takes precedence over the octagon flag,
thus, if both the square and octagon flags are set, the object is
square.  When the square flag is cleared, the pins and pads will be
either round or, if the octagon flag is set, octagonal.

SetThermal
----------

     SetThermal(Object|SelectedPins|SelectedVias|Selected|SelectedElements) format

Set a thermal (on the current layer) to pins or vias.

This adds an electrical connection between the pins or vias, and any rectangle or polygon on the current layer.

SetValue
--------

     SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta) format

Change various board-wide values and sizes.

ViaDrillingHole
     Changes the diameter of the drill for new vias.

Grid
     Sets the grid spacing.

Line

LineSize
     Changes the thickness of new lines.

Via

ViaSize
     Changes the diameter of new vias.

Text

TextScale
     Changes the size of new text.

ToggleHideName
--------------

     ToggleHideName(Object|SelectedElements) format

Toggles the visibility of element names.

If names are hidden you won't see them on the screen and they will not appear on the silk layer when you print the layout.

ToggleThermal
-------------

     ToggleThermal(Object|SelectedPins|SelectedVias|Selected) format

Toggle a thermal (on the current layer) to pins or vias.

This changes the electrical connection between the pins or vias, and any rectangle or polygon on the current layer.

ToggleVendor
------------

     ToggleVendor() format

Toggles the state of automatic drill size mapping.

When drill mapping is enabled, new instances of pins and vias will have their drill holes mapped to one of the allowed drill sizes specified in the currently loaded vendor drill table.  To enable drill mapping, a vendor resource file containing a drill table must be loaded first.

Undo
----

     Undo()
     Undo(ClearList) format

Undo recent changes.

The unlimited undo feature of Pcb allows you to recover from most operations that materially affect you work.  Calling Undo() without any parameter recovers from the last (non-undo) operation. ClearList is used to release the allocated memory. ClearList is called whenever a new layout is started or loaded. See also Redo and Atomic.

Note that undo groups operations by serial number; changes with the same serial number will be undone (or redone) as a group.  See Atomic.

UnloadVendor
------------

     UnloadVendor() format

Unloads the current vendor drill mapping table.

Unselect
--------

     Unselect(All|Block|Connection)
     Unselect(ElementByName|ObjectByName|PadByName|PinByName)
     Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)
     Unselect(TextByName|ViaByName)
     Unselect(TextByName|ViaByName, Name)

unselects the object at the pointer location or the specified objects

All
     Unselect all objects.

Block
     Unselect all objects in a rectangle given by the cursor.

Connection
     Unselect all connections with the ``found'' flag set.

ElementByName

ObjectByName

PadByName

PinByName

TextByName

ViaByName

     These all rely on having a regular expression parser built into pcb.  If the name is not specified then the user is prompted for a pattern, and all objects that match the pattern and are of the type specified are unselected.

w
-

     w [name] format

Saves layout data.

This commands has been added for the convenience of vi users and has the same functionality as s.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

wq
--

     wq format

Saves the layout data and quits.

This command has been added for the convenience of vi users and has the same functionality as s combined with q.

This is one of the command box helper actions.  While it is a regular
action and can be used like any other action, its name and syntax are
optimized for use with the command box (:) and thus the syntax
is documented for that purpose.

common actions
==============

LayersChanged
-------------

     LayersChanged() format

Tells the GUI that the layers have changed.

This includes layer names, colors, stacking order, visibility, etc.

This is one of a number of actions which are part of the HID
interface.  The core functions use these actions to tell the current
GUI when to change the presented information in response to changes
that the GUI may not know about.  The user normally does not invoke
these directly.

LibraryChanged
--------------

     LibraryChanged() format

Tells the GUI that the libraries have changed.

This is one of a number of actions which are part of the HID
interface.  The core functions use these actions to tell the current
GUI when to change the presented information in response to changes
that the GUI may not know about.  The user normally does not invoke
these directly.

NetlistChanged
--------------

     NetlistChanged() format

Tells the GUI that the netlist has changed.

This is one of a number of actions which are part of the HID
interface.  The core functions use these actions to tell the current
GUI when to change the presented information in response to changes
that the GUI may not know about.  The user normally does not invoke
these directly.

PCBChanged
----------

     PCBChanged() format

Tells the GUI that the whole PCB has changed.

This is one of a number of actions which are part of the HID
interface.  The core functions use these actions to tell the current
GUI when to change the presented information in response to changes
that the GUI may not know about.  The user normally does not invoke
these directly.

RouteStylesChanged
------------------

     RouteStylesChanged() format

Tells the GUI that the routing styles have changed.

This is one of a number of actions which are part of the HID
interface.  The core functions use these actions to tell the current
GUI when to change the presented information in response to changes
that the GUI may not know about.  The user normally does not invoke
these directly.

gtk actions
===========

gtk About
---------

     About() format

Tell the user about this version of PCB.

This just pops up a dialog telling the user which version of pcb they're running.

gtk Zoom
--------

     Zoom(gtk) format

this is the gtk zoom

This is for the gtk zoom.

lesstif actions
===============

lesstif About
-------------

     About() format

Tell the user about this version of PCB.

This just pops up a dialog telling the user which version of pcb they're running.

lesstif AdjustSizes
-------------------

     AdjustSizes() format

Let the user change the board size, DRC parameters, etc

Displays a dialog box that lets the user change the board size, DRC parameters, and text scale.

The units are determined by the default display units.

lesstif AdjustStyle
-------------------

     AdjustStyle() format

Displays the route style adjustment window.

lesstif Benchmark
-----------------

     Benchmark() format

Benchmark the GUI speed.

This action is used to speed-test the Lesstif graphics subsystem.  It redraws the current screen as many times as possible in ten seconds. It reports the amount of time needed to draw the screen once.

lesstif Command
---------------

     Command() format

Displays the command line input window.

The command window allows the user to manually enter actions to be executed.  Action syntax can be done one of two ways:

     Follow the action name by an open parenthesis, arguments separated by commas, end with a close parenthesis.  Example: Abc(1,2,3)

     Separate the action name and arguments by spaces.  Example: Abc 1 2 3.

The first option allows you to have arguments with spaces in them, but the second is more ``natural'' to type for most people.

Note that action names are not case sensitive, but arguments normally are.  However, most actions will check for ``keywords'' in a case insensitive way.

There are three ways to finish with the command window.  If you press the Enter key, the command is invoked, the window goes away, and the next time you bring up the command window it's empty.  If you press the Esc key, the window goes away without invoking anything, and the next time you bring up the command window it's empty.  If you change focus away from the command window (i.e. click on some other window), the command window goes away but the next time you bring it up it resumes entering the command you were entering before.

lesstif Debug
-------------

     Debug(...) format

Debug action.

This action exists to help debug scripts; it simply prints all its arguments to stdout.

lesstif DebugXY
---------------

     DebugXY(...) format

Debug action, with coordinates

Like Debug, but requires a coordinate.  If the user hasn't yet indicated a location on the board, the user will be prompted to click on one.

lesstif DoWindows
-----------------

     DoWindows(1|2|3|4)
     DoWindows(Layout|Library|Log|Netlist) format

Open various GUI windows.

1
Layout
     Open the layout window.  Since the layout window is always shown anyway, this has no effect.

2
Library
     Open the library window.

3
Log
     Open the log window.

4
Netlist
     Open the netlist window.

lesstif DumpKeys
----------------

     DumpKeys() format

Dump Lesstif key bindings.

Causes the list of key bindings (from pcb-menu.res) to be dumped to stdout.  This is most useful when invoked from the command line like this:

     pcb --action-string DumpKeys

lesstif EditLayerGroups
-----------------------

     EditLayerGroups() format

Let the user change the layer groupings

Displays a dialog that lets the user view and change the layer groupings.  Each layer (row) can be a member of any one layer group (column).  Note the special layers solder and component allow you to specify which groups represent the top and bottom of the board.

See ChangeName Action.

lesstif Export
--------------

     Export() format

Export the layout.

Prompts the user for an exporter to use.  Then, prompts the user for that exporter's options, and exports the layout.

lesstif GetXY
-------------

     GetXY() format

Get a coordinate.

Prompts the user for a coordinate, if one is not already selected.

lesstif LibraryShow
-------------------

     LibraryShow() format

Displays the library window.

lesstif Load
------------

     Load()
     Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert) format

Load layout data from a user-selected file.

This action is a GUI front-end to the core's LoadFrom action (see LoadFrom Action).  If you happen to pass a filename, like LoadFrom, then LoadFrom is called directly.  Else, the user is prompted for a filename to load, and then LoadFrom is called with that filename.

lesstif LoadVendor
------------------

     LoadVendor() format

Loads a user-selected vendor resource file.

The user is prompted for a file to load, and then LoadVendorFrom is called (see LoadVendorFrom Action) to load that vendor file.

lesstif NetlistShow
-------------------

     NetlistShow() format

Displays the netlist window.

lesstif Print
-------------

     Print() format

Print the layout.

This will find the default printing HID, prompt the user for its options, and print the layout.

lesstif PromptFor
-----------------

     PromptFor([message[,default]]) format

Prompt for a response.

This is mostly for testing the lesstif HID interface.  The parameters are passed to the prompt_for() HID function, causing the user to be prompted for a response.  The respose is simply printed to the user's stdout.

lesstif Return
--------------

     Return(0|1) format

Simulate a passing or failing action.

This is for testing.  If passed a 0, does nothing and succeeds.  If passed a 1, does nothing but pretends to fail.

lesstif Save
------------

     Save()
     Save(Layout|LayoutAs)
     Save(AllConnections|AllUnusedPins|ElementConnections) format

Save layout data to a user-selected file.

This action is a GUI front-end to the core's SaveTo action (see SaveTo Action).  If you happen to pass a filename, like SaveTo, then SaveTo is called directly.  Else, the user is prompted for a filename to save, and then SaveTo is called with that filename.

lesstif SelectLayer
-------------------

     SelectLayer(1..MAXLAYER|Silk|Rats) format

Select which layer is the current layer.

The specified layer becomes the currently active layer.  It is made visible if it is not already visible

lesstif SetUnits
----------------

     SetUnits(mm|mil) format

Set the default measurement units.

mil
     Sets the display units to mils (1/1000 inch).

mm
     Sets the display units to millimeters.

lesstif SwapSides
-----------------

     SwapSides(|v|h|r) format

Swaps the side of the board you're looking at.

This action changes the way you view the board.

v
     Flips the board over vertically (up/down).

h
     Flips the board over horizontally (left/right), like flipping pages in a book.

r
     Rotates the board 180 degrees without changing sides.

If no argument is given, the board isn't moved but the opposite side is shown.

Normally, this action changes which pads and silk layer are drawn as true silk, and which are drawn as the "invisible" layer.  It also determines which solder mask you see.

As a special case, if the layer group for the side you're looking at is visible and currently active, and the layer group for the opposite is not visible (i.e. disabled), then this action will also swap which layer group is visible and active, effectively swapping the ``working side'' of the board.

lesstif ThinDraw
----------------

     ThinDraw()
     ThinDraw(1|0) format

Sets the global thin-draw flag.

When the thindraw flag is set, all board objects are drawn using ``thin'' lines.  Traces are drawn as single lines along their centerlines, other objects are drawn as outlines.  If you pass 0, thin draw is disabled.  If you pass 1, thin draw is enabled.  If you pass nothing, thin draw is toggled.

lesstif ThinDrawPoly
--------------------

     ThinDrawPoly()
     ThinDrawPoly(0|1) format

Sets the thin-draw flag for polygons.

When the polygon thindraw flag is set, all polygons are drawn using ``thin'' lines along their outlines.  If you pass 0, polygon thin draw is disabled.  If you pass 1, polygon thin draw is enabled.  If you pass nothing, polygon thin draw is toggled.

lesstif ToggleView
------------------

     ToggleView(1..MAXLAYER)
     ToggleView(layername)
     ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide) format

Toggle the visibility of the specified layer or layer group.

If you pass an integer, that layer is specified by index (the first layer is 1, etc).  If you pass a layer name, that layer is specified by name.  When a layer is specified, the visibility of the layer group containing that layer is toggled.

If you pass a special layer name, the visibility of those components (silk, rats, etc) is toggled.  Note that if you have a layer named the same as a special layer, the layer is chosen over the special layer.

lesstif Zoom
------------

     Zoom()
     Zoom(factor) format

Various zoom factor changes.

Changes the zoom (magnification) of the view of the board.  If no arguments are passed, the view is scaled such that the board just fits inside the visible window (i.e. ``view all'').  Otherwise, FACTOR specifies a change in zoom factor.  It may be prefixed by +, -, or = to change how the zoom factor is modified.  The FACTOR is a floating point number, such as 1.5 or 0.75.

+FACTOR
     Values greater than 1.0 cause the board to be drawn smaller; more of the board will be visible.  Values between 0.0 and 1.0 cause the board to be drawn bigger; less of the board will be visible.

-FACTOR
     Values greater than 1.0 cause the board to be drawn bigger; less of the board will be visible.  Values between 0.0 and 1.0 cause the board to be drawn smaller; more of the board will be visible.

=FACTOR

     The FACTOR is an absolute zoom factor; the unit for this value is "PCB units per screen pixel".  Since PCB units are 0.01 mil, a FACTOR of 1000 means 10 mils (0.01 in) per pixel, or 100 DPI, about the actual resolution of most screens - resulting in an "actual size" board.  Similarly, a FACTOR of 100 gives you a 10x actual size.

Note that zoom factors of zero are silently ignored.