Syntax summary: | AddRats(AllRats|SelectedRats|Close) |
---|---|
Help text: | Add one or more rat lines to the board. |
Registered by: | n/a |
Arguments:
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. |
@item Close | Selects the shortest unselected rat on the board. |
Syntax summary: | AddTimer(action, period, [repeat], [userdata]) |
---|---|
Help text: | Add a new timer |
Registered by: | script plugin |
This action is intended for scripts to create async timers. Note: timers do not work with the batch HID (no callback issued ever).
Creates a timer that executes an action (by name) periodically. Period is a real number specified in seconds. Internal timer resolution is in the order of 0.1 second.
If repeat is not specified or is less than 1, the timer is repeated indefinitely. If the optional userdata string is specified, it is also passed to the action.
The action is specified only by a name, call arguments are always the following:
Action shall return integer 0 on success. If the action does not exist or returns anything else, the timer is uninstalled.
There can be any number of timers in parallel.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
Opens the window which allows editing of the route styles.
Syntax summary: | Align(X/Y, [Lefts/Rights/Tops/Bottoms/Centers/Marks, [First/Last/pcb_crosshair/Average[, Gridless]]]) |
---|---|
Help text: | Align subcircuits |
Registered by: | distalign plugin |
Example: Align(X, [Lefts/Rights/Centers/Marks, [First/Last/pcb_crosshair/Average[, Gridless]]])
Example: Align(Y, [Tops/Bottoms/Centers/Marks, [First/Last/pcb_crosshair/Average[, Gridless]]])
Arguments:
X or Y | Select which axis will move, other is untouched. |
---|---|
Lefts, Rights, Tops, Bottoms, Centers, Marks | Pick alignment point within each subcircuit |
First, Last, pcb_crosshair, Average | Alignment reference, First=Topmost/Leftmost, Last=Bottommost/Rightmost, Average or pcb_crosshair point |
Gridless | Do not force results to align to prevailing grid. |
Defaults are Marks, First.
Syntax summary: | AlignText(X/Y, [Lefts/Rights/Tops/Bottoms/Centers, [First/Last/pcb_crosshair/Average[, Gridless]]]) |
---|---|
Help text: | Align Text Elements |
Registered by: | distaligntext plugin |
Example: AlignText(X, [Lefts/Rights/Centers, [First/Last/pcb_crosshair/Average[, Gridless]]])
Example: AlignText(Y, [Tops/Bottoms/Centers, [First/Last/pcb_crosshair/Average[, Gridless]]])
Arguments:
X or Y | Select which axis will move, other is untouched. |
---|---|
Lefts, Rights, Tops, Bottoms, Centers |
Pick alignment point within each element.
NB: text objects have no Mark. |
First, Last, pcb_crosshair, Average | Alignment reference, First=Topmost/Leftmost, Last=Bottommost/Rightmost, Average or pcb_crosshair point \n |
Gridless | Do not force results to align to prevailing grid. \n |
Defaults are Lefts/Tops, First
Syntax summary: | ApplyVendor() |
---|---|
Help text: | Applies the currently loaded vendor drill table to the current design. |
Registered by: | vendor drill mapping |
This will modify all of your drill holes to match the list of allowed sizes for your vendor.
Syntax summary: | Atomic(Save|Restore|Close|Block) |
---|---|
Help text: | Save or restore the undo serial number. |
Registered by: | n/a |
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.
Arguments:
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. |
Syntax summary: | Attributes(Layout|Layer|Element|Subc) Attributes(Layer,layername) |
---|---|
Help text: | Let the user edit the attributes of the layout, current or given layer, or selected subcircuit. |
Registered by: | n/a |
Pops up a dialog letting the user edit the attributes of the pcb, a subcircuit, or a layer.
Syntax summary: | AutoPlaceSelected() |
---|---|
Help text: | Auto-place selected components. |
Registered by: | autoplace plugin |
Attempts to re-arrange the selected components such that the nets connecting them are minimized. Note that you cannot undo this.
Syntax summary: | AutoRoute(AllRats|SelectedRats) |
---|---|
Help text: | Auto-route some or all rat lines. |
Registered by: | autoroute plugin |
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 routing 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.
Arguments:
AllRats | Attempt to autoroute all rats. |
---|---|
SelectedRats | Attempt to autoroute the selected rats. |
Syntax summary: | Benchmark() |
---|---|
Help text: | Benchmark the GUI speed. |
Registered by: | n/a |
This action is used to speed-test the GUI rendering. 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, in average.
Syntax summary: | BoardFlip([sides]) |
---|---|
Help text: | Mirror the board over the x axis, optionally mirroring sides as well. |
Registered by: | n/a |
All objects on the board are up-down flipped (mirrored over the x axis).
Command line board flipping:
echo " BoardFlip() SaveTo(LayoutAs,$OUTFILE) Quit() " | pcb $INFILE
To flip the board physically, use BoardFlip(sides)
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
Move the pointer to the center of the window, but only if it's currently within the window already.
Syntax summary: | ChangeClearSize(Object, delta|style) ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta|style) ChangeClearSize(SelectedLines|SelectedArcs, delta|style) ChangeClearSize(Selected|SelectedObjects, delta|style) |
---|---|
Help text: | Changes the clearance size of objects. |
Registered by: | n/a |
If the solder mask is currently showing, this action changes the solder mask cutout size. If the mask is not showing, this action changes the polygon clearance.
Syntax summary: | ChangeFlag(Object|Selected|SelectedObjects, flag, value) ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value) ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value) ChangeFlag(SelectedElements, flag, value) flag = thermal | join value = 0 | 1 |
---|---|
Help text: | Sets or clears flags on objects. |
Registered by: | n/a |
Toggles the given flag on the indicated object(s). The flag may be one of the flags listed above (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.
Syntax summary: | ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected) |
---|---|
Help text: | Changes the join (clearance through polygons) of objects. |
Registered by: | n/a |
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.
Syntax summary: | ChangeName(Object) ChangeName(Refdes) ChangeName(Layout|Layer) |
---|---|
Help text: | Sets the name, text string, terminal ID or refdes of objects. |
Registered by: | n/a |
Arguments:
Object | Changes the "name" of the object under the cursor. For a text object this is the text string. For a terminal, this is the terminal ID. For a subcircuit this is the refdes. For a subc text object that has only the refdes template in it, it offers changing the text object (template) or the parent subcircuit's refdes attribute. |
---|---|
Refdes | Changes the refdes attribute of a subcircuit 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. |
Syntax summary: | ChangePinName(Refdes,PinNumber,PinName) |
---|---|
Help text: | Sets the name of a specific pin on a specific subcircuit. |
Registered by: | n/a |
This can be especially useful for annotating pin names from a schematic to the layout without requiring knowledge of the pcb file format.
Example: ChangePinName(U3, 7, VCC)
Syntax summary: | ChangeSize(Object, delta|style) ChangeSize(SelectedObjects|Selected, delta|style) ChangeSize(SelectedLines|SelectedPins|SelectedVias, delta|style) ChangeSize(SelectedPads|SelectedTexts|SelectedNames, delta|style) ChangeSize(SelectedElements, delta|style) |
---|---|
Help text: | Changes the size of objects. |
Registered by: | n/a |
For lines and arcs, this changes the width. For padstacks, this changes the shape size (but does not touch the hole diameter). For texts, this changes the scaling factor. For subcircuits, this changes the width of the silk layer lines and arcs for this subcircuit (TODO: is this still true?).
Syntax summary: | ChangeSizes(Object, delta|style) ChangeSizes(SelectedObjects|Selected, delta|style) ChangeSizes(SelectedLines|SelectedPins|SelectedVias, delta|style) ChangeSizes(SelectedPads|SelectedTexts|SelectedNames, delta|style) ChangeSizes(SelectedElements, delta|style) |
---|---|
Help text: | Changes all sizes of objects. |
Registered by: | n/a |
Call ChangeSize, ChangeDrillSize and ChangeClearSize with the same arguments. If any of them did not fail, return success.
Syntax summary: | ChkLayer(layerid) |
---|---|
Help text: | Returns 1 if the specified layer is the active layer |
Registered by: | n/a |
Returns 1 if the specified layer is the active layer.
Syntax summary: | ChkRst(route_style_id) |
---|---|
Help text: | Return 1 if route_style_id matches pen. |
Registered by: | n/a |
Return 1 if route_style_id matches pen.
Syntax summary: | ChkView(layerid) |
---|---|
Help text: | Return 1 if layerid is visible. |
Registered by: | n/a |
Return 1 if layerid is visible. Intended for menu item 'checked' fields.
Syntax summary: | ClaimNet(object|selected|found,[netname]) |
---|---|
Help text: | Claim existing connections and create a new net |
Registered by: | n/a |
The ClaimNet() action can be used to construct network metadata (netlist entry) converting existing physical (galvanic, copper) connections or object lists.
When galvanic connections are mapped, the first argument shall be object ; in this case the object under the mouse cursor is the starting point and anything galvanically connected (at the moment) is considered part of the new network. This mode of operation is useful for capturing existing nets.
When the first argument is selected or found , the list of (selected or found) terminals are converted to a new net, regardless of galvanic connections. This mode is useful for designing a PCB by a netlist but without a schematics - in this setup the netlist is "drawn" in pcb-rnd as well.
If netname is specified, the user is prompted for a name.
Syntax summary: | ClrFlag(Object|Selected|SelectedObjects, flag) ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag) ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag) ClrFlag(SelectedElements, flag) flag = thermal | join |
---|---|
Help text: | Clears flags on objects. |
Registered by: | n/a |
Turns the given flag off, regardless of its previous setting. See changeflag .
Example: ClrFlag(SelectedLines,join)
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
The command window allows the user to manually enter actions to be executed.
There are two ways to finish with the command window. If you press the Enter key, the command is invoked, the entry normally 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.
Use the up and down arrow keys to access command history.
Syntax summary: | Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset) |
---|---|
Help text: | Searches connections of the object at the cursor position. |
Registered by: | n/a |
Connections found with this action will be highlighted in the "connected-color" color and will have the "found" flag set.
Arguments:
Find | The net under the cursor is "found". |
---|---|
ResetLayerObjects | Any "found" layer objects (lines, arcs, polygons and texts) are marked "not found". |
ResetPadstacks | Any "found" padstack are marked "not found". WARNING: does not touch non-padstack heavy terminals! |
Reset | All "found" objects are marked "not found". |
ResetLinesAndPolygons | Obsolate, misleading name for ResetLayerObjects. Do not use. |
ResetPinsAndVias | Obsolate, misleading name for ResetPadstacks. Do not use. |
Syntax summary: | Cursor(Type,DeltaUp,DeltaRight,Units) |
---|---|
Help text: | Move the cursor. |
Registered by: | n/a |
This action moves the mouse cursor. Unlike other actions which take coordinates, this action's coordinates are always relative to the user's view of the board. Thus, a positive DeltaUp may move the cursor away from the board origin if the board is inverted (flipped, looked from the bottom).
Type is one of Pan or Warp . Pan causes the viewport to move such that the crosshair is under the mouse cursor. Warp causes the mouse cursor to move to be above the crosshair.
Units can be one of the following:
mil
mm | The cursor is moved by that amount, in board units. |
grid | The cursor is moved by that many grid points. |
view | The values are percentages of the viewport's view. Thus, a pan of 100 would scroll the viewport by exactly the width of the current view. |
board | The values are percentages of the board size. Thus, a move of 50,50 moves you halfway across the board. |
Syntax summary: | CycleDrag() |
---|---|
Help text: | Cycle through which object is being dragged |
Registered by: | n/a |
When multiple overlapping objects are accessible by clicking on a pixel on the screen, drag&drop operations may become harder to do: pcb-rnd will often "pick the wrong object" on click.
Cycledraw provides a way to get pcb-rnd to jump to selecting another object of the avaialble ones on the original site, while the user is still in drag mode. This obviously works only through the key binding, as selecting the menu would require the drag operation to finish first.
Syntax summary: | DisperseElements(All|Selected) |
---|---|
Help text: | Disperses subcircuits. |
Registered by: | n/a |
Normally this is used when starting a board, by selecting all subcircuits and then dispersing them. This scatters the subcircuits around the board so that you can pick individual ones, rather than have all the subcircuits at the same 0,0 coordinate and thus impossible to choose from.
Syntax summary: | Display(SubcID, template) Display(Grid|Redraw|Pinout|PinOrPadName) Display(CycleClip|CycleCrosshair|ToggleAllDirections|ToggleStartDirection) Display(ToggleGrid|ToggleRubberBandMode|ToggleUniqueNames) Display(ToggleName|ToggleClearLine|ToggleFullPoly|ToggleSnapPin) Display(ToggleSnapOffGridLine|ToggleHighlightOnPoint|ToggleCheckPlanes) Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef) Display(ToggleLiveRoute|ToggleShowDRC|ToggleAutoDRC|LockNames|OnlyNames) |
---|---|
Help text: | Several display-related actions. |
Registered by: | n/a |
Changes random display related global states.
SubcID
Description Value | Specify the subcircuit ID template to be printed on the subcircuit layer |
---|---|
Redraw | Redraw the whole board. |
ToggleAllDirections | 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. |
CycleCrosshair | Changes crosshair drawing. Crosshair may accept form of 4-ray, 8-ray and 12-ray cross. |
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. |
ToggleSnapOffGridLine | If set, snap at some sensible point along a line. |
ToggleHighlightOnPoint | If set, highlights lines and arcs when the crosshair is on one of their two (end) points. |
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. |
ToggleThindrawPoly | If set, polygons on the screen are drawn as outlines. |
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 a subcircuit 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. |
ToggleLockNames | If set, text will ignore left mouse clicks and actions that work on objects under the mouse. You can still select text with a lasso (left mouse drag) and perform actions on the selection. |
ToggleOnlyNames | If set, only text will be sensitive for mouse clicks and actions that work on objects under the mouse. You can still select other objects with a lasso (left mouse drag) and perform actions on the selection. |
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. |
ToggleFullPoly | When set, the full-poly flag causes new polygons to have their "full polygon" flag set, so all parts of them will be displayed instead of only the biggest one. |
ToggleGrid | Resets the origin of the current grid to be wherever the crosshair is. If you provide two numbers after this, the origin is set to that coordinate. |
Grid | Toggles whether the grid is displayed or not. |
Pinout | Causes the pinout of the subcircuit indicated by the cursor to be displayed, usually in a separate window. |
PinOrPadName | Toggles whether the names of terminals will be displayed. If the cursor is over an subcircuit, all of its terminals are affected. |
Syntax summary: | Distribute(X/Y, [Lefts/Rights/Tops/Bottoms/Centers/Marks/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]]) |
---|---|
Help text: | Distribute subcircuits |
Registered by: | distalign plugin |
Example: Distribute(X, [Lefts/Rights/Centers/Marks/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
Example: Distribute(Y, [Tops/Bottoms/Centers/Marks/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
As with align , plus:
Arguments:
Gaps | Make gaps even rather than spreading points evenly. |
---|---|
First, Last, pcb_crosshair | Two arguments specifying both ends of the distribution, they can't both be the same. |
Defaults are Marks, First, Last
Distributed subcircuits always retain the same relative order they had before they were distributed.
Syntax summary: | DistributeText(Y, [Lefts/Rights/Tops/Bottoms/Centers/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]]) |
---|---|
Help text: | Distribute Text Elements |
Registered by: | distaligntext plugin |
Example: DistributeText(X, [Lefts/Rights/Centers/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
Example: DistributeText(Y, [Tops/Bottoms/Centers/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
As with align, plus:
Gaps | Make gaps even rather than spreading points evenly. |
---|---|
First, Last, pcb_crosshair | Two arguments specifying both ends of the distribution, they can't both be the same. |
Defaults are Lefts/Tops, First, Last
Distributed texts always retain the same relative order they had before they were distributed.
Syntax summary: | djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull) djopt(auto) - all of the above djopt(miter) |
---|---|
Help text: | Perform various optimizations on the current board. |
Registered by: | djopt |
The different types of optimizations change your board in order to reduce the total trace length and via count.
Arguments:
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. |
splitlines | Looks for lines that pass through vias, pins, or pads, and splits them into separate lines so they can be managed separately. |
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. |
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
Argument:
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. |
5
Preferences | Open the preferences window. |
6
DRC | Open the DRC violations window. |
7
Search | Open the advanced search window. |
Syntax summary: | DRC([list|simple|print|log|dump]) |
---|---|
Help text: | Invoke the DRC check. Results are presented as the argument requests. |
Registered by: | n/a |
Output styles available:
name | description |
---|---|
list | display a full list of all violations, with preview of the current item (large dialog) |
simple | a small & simple dialog that navigates the user through the violations one by one, sequentially |
print the list to stdout in human readable form | |
log | print the list as INFO lines in the log in human readable form |
dump | print the list to stdout in script readable form |
Note that the design rule check uses the current board rule settings, not the current style settings.
Syntax summary: |
ElementList(Start|Done|Need,Help text: |
Adds the given element if it doesn't already exist.
| Registered by: | n/a
| |
---|
Arguments:
Start | Indicates the start of an subcircuit list; call this before any Need actions. |
---|---|
Need |
Searches the board for an subcircuit with a matching refdes.
If found, the value and footprint are updated. If not found, a new subcircuit is created with the given footprint and value. |
Done | Compares the list of subcircuits needed since the most recent Start with the list of subcircuits actually on the board. Any subcircuits that weren't listed are selected, so that the user may delete them. |
Syntax summary: | ElementSetAttr(refdes,name[,value]) |
---|---|
Help text: | Sets or clears an element-specific attribute. |
Registered by: | n/a |
If a value is specified, the named attribute is added (if not already present) or changed (if it is) to the given value. If the value is not specified, the given attribute is removed if present.
Syntax summary: | ExecuteFile(filename) |
---|---|
Help text: | Run actions from the given file. |
Registered by: | n/a |
Lines starting with # are ignored.
Syntax summary: | ExportOldConn(AllConnections|AllUnusedPins|ElementConnections,filename) |
---|---|
Help text: | Export galvanic connection data in an old, custom file format. |
Registered by: | export_oldconn HID |
Arguments:
AllConnections | Save all connections to a file. |
---|---|
AllUnusedPins | List all unconnected terminals to a file. |
ElementConnections | Save connections to the subcircuit at the cursor to a file. |
Syntax summary: | Flip(Object|Selected) |
---|---|
Help text: | Flip a subcircuit to the opposite side of the board. |
Registered by: | n/a |
Note that the location of the subcircuit 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 subcircuit is on the other side. When flipping multiple subcircuits, this retains their positions relative to each other, not their absolute positions on the board.
Syntax summary: | FreeRotateBuffer([Angle]) |
---|---|
Help text: | Rotates the current paste buffer contents by the specified angle. The angle is given in degrees. If no angle is given, the user is prompted for one. |
Registered by: | n/a |
Rotates the contents of the pastebuffer by an arbitrary angle. If no angle is given, the user is prompted for one.
Syntax summary: | GetXY() |
---|---|
Help text: | Get a coordinate. |
Registered by: | n/a |
Prompts the user for a coordinate, if one is not already selected.
Syntax summary: | Import() Import([gnetlist|make[,source,source,...]]) Import(setnewpoint[,(mark|center|X,Y)]) Import(setdisperse,D,units) |
---|---|
Help text: | Import schematics. |
Registered by: | import_sch plugin |
Imports subcircuits and netlist data from the schematics (or some other source). The first parameter, which is optional, is the mode. If not specified, the import::mode attribute in the board is used. Possible values: gnetlist means gnetlist is used to obtain the information from the schematics; make invokes make, assuming the user has a Makefile in the current directory. The Makefile will be invoked with the following variables set:
PCB | The name of the .pcb file |
---|---|
SRCLIST | A space-separated list of source files |
OUT | The name of the file in which to put the command script, which may contain any @pcb{} actions. By default, this is a temporary file selected by @pcb{}, but if you specify an import::outfile attribute, that file name is used instead (and not automatically deleted afterwards). |
The target specified to be built is the first of these that apply:
If you specify an import::makefile attribute, then "-f that file " will be added to the command line.
If you specify the mode, you may also specify the source files (schematics). If you do not specify any, the list of schematics is obtained by reading the import::srcN attributes (like import::src0 , import::src1 , etc).
For compatibility with future extensions to the import file format, the generated file must not start with the two characters #%.
If a temporary file is needed the TMPDIR environment variable is used to select its location.
Note that the programs gnetlist and make must be configured.
If pcb-rnd cannot determine which schematic(s) to import from, the GUI is called to let user choose (see importgui() ).
Note that import() doesn't delete anything - after an Import, subcircuits which shouldn't be on the board are selected and may be removed once it's determined that the deletion is appropriate. TODO: is this still true?
If import() is called with setnewpoint , then the location of new components can be specified. This is where parts show up when they're added to the board. The default is the center of the board. Argument combinations:
Import(setnewpoint) | Prompts the user to click on the board somewhere, uses that point. If called by a hotkey, uses the current location of the crosshair. |
---|---|
Import(setnewpoint,mark) | Uses the location of the mark. If no mark is present, the point is not changed. |
Import(setnewpoint,center) | Resets the point to the center of the board. |
Import(setnewpoint,X,Y,units) |
Sets the point to the specific coordinates given.
|
Note that the X and Y locations are stored in attributes named import::newX and import::newY} so you could change them manually if you wished.
Calling Import(setdisperse,D,units) sets how much the newly placed subcircuits are dispersed relative to the set point. For example, Import(setdisperse,10,mm) will offset each part randomly up to 10mm away from the point. The default dispersion is 1/10th of the smallest board dimension. Dispersion is saved in the import::disperse attribute.
Syntax summary: | ImportGUI() |
---|---|
Help text: | Asks user which schematics to import into PCB. |
Registered by: | dialogs plugin |
Displays a dialog that lets the user select the schematic(s) to import from, then saves that information in the layout's attributes for future imports.
Syntax summary: | l [name] [format] |
---|---|
Help text: | Loads layout data. |
Registered by: | shand_cmd plugin |
Loads a new datafile (layout) and, if confirmed, overwrites any existing unsaved data. If no filename is specified a file select box will popup.
Syntax summary: | le [name] |
---|---|
Help text: | Loads an element (subcircuit, footprint) into the current buffer. |
Registered by: | shand_cmd plugin |
The filename is passed to the footprint loader. If no filename is specified a file select box will popup.
Syntax summary: | ListScripts([pat]) |
---|---|
Help text: | List fungw scripts, optionally filtered wiht regex pat. |
Registered by: | script plugin |
Print one line in the log for each currently loaded script. If pat is specified, filter the list using pat as a case sensitive regex on script ID, file name and language (list only scripts that match with any of these fields).
Syntax summary: | LiveScript([new], [name]) LiveScript(load|save, name, [filame]) LiveScript(run|stop|rerun|undo, name) |
---|---|
Help text: | Manage a live script |
Registered by: | script plugin |
The first argument determines what operation the action performs and how subsequent arguments are interpreted:
new, [name] | Create a new live script and open a new live script dialog. name is an unique live script name that identifies the window. If not specified, "default" is used" |
---|---|
load, name, [filename] | Replace the script source in the LiveScript window identified by name with the content loaded from a file. If filename is not specified, open a file selector dialog. |
save, name, [filename] | Save the script source in the LiveScript window identified by name to a file. If filename is not specified, open a file selector dialog. |
run, name | Run the script in the LiveScript window identified by name . |
stop, name | Stop the script in the LiveScript window identified by name , if ti is running in persistent mode. |
undo, name | Undo the "init changes" of the script in the LiveScript window identified by name . Init changes are those board changes the script has done while running its initialization section. Live script undo is possible only if there was no user edit after the script finished. |
rerun, name | Stop, undo and run the script in the LiveScript window identified by name . |
Syntax summary: | Load() Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert) |
---|---|
Help text: | Load layout data from a user-selected file. |
Registered by: | dialogs plugin |
This action is a GUI front-end to the core's loadfrom action. If you happen to pass a filename, loadfrom is called directly. Else, the user is prompted for a filename to load, and then loadfrom is called with that filename.
Syntax summary: | pcb_load_footprint(filename[,refdes,value]) |
---|---|
Help text: | Loads a single footprint by name. |
Registered by: | n/a |
Loads a single footprint by name, rather than by reference or through the library. If a refdes and value are specified, those are inserted into the footprint as well. The footprint remains in the paste buffer.
Syntax summary: | LoadFrom(Layout|LayoutToBuffer|SubcToBuffer|Netlist|Revert,filename[,format]) |
---|---|
Help text: | Load layout data from a file. |
Registered by: | n/a |
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.
Arguments:
Layout | Loads an entire PCB layout, replacing the current one. |
---|---|
LayoutToBuffer | Loads an entire PCB layout to the paste buffer. |
ElementToBuffer | Loads the given footprint file into the paste buffer. Footprint files contain only a single subcircuit definition in one of the various supported file formats. |
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. |
Syntax summary: | LoadScript(id, filename, [language]) |
---|---|
Help text: | Load a fungw script |
Registered by: | script plugin |
id is an arbitrary string assigned by the user. id must be unique per pcb-rnd session per script and may contain alphanumeric characters and undescrore.
fn is the file name of the script, which is a path. Pcb-rnd does not do any search, it only opens the path as specified.
lang is the scripting language, as in fungw plugin name . When not specified, the code makes a guess (based on the file name).
Syntax summary: | LoadVendorFrom(filename) |
---|---|
Help text: | Loads the specified vendor lihata file. |
Registered by: | vendor drill mapping |
Arguments:
filename | Name of the vendor lihata file. If not specified, the user will be prompted to enter one. |
---|
Syntax summary: | m [name] |
---|---|
Help text: | Loads a layout into the current buffer. |
Registered by: | shand_cmd plugin |
If no filename is specified a file select box will popup.
Syntax summary: | MarkCrosshair() MarkCrosshair(Center) |
---|---|
Help text: | Set/Reset the pcb_crosshair mark. |
Registered by: | n/a |
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.
Syntax summary: | message(message) |
---|---|
Help text: | Writes a message to the log window. |
Registered by: | n/a |
This action displays a message to the log window. This action is primarily provided for use by scripts and external programs which may interface with pcb-rnd. If multiple arguments are given, each one is sent to the log window followed by a newline.
Syntax summary: | MinClearGap(delta) MinClearGap(Selected, delta) |
---|---|
Help text: | Ensures that polygons are a minimum distance from objects. |
Registered by: | n/a |
Checks all specified objects, and increases the polygon clearance if needed to ensure a minimum distance between their edges and the polygon edges.
Syntax summary: | 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) |
---|---|
Help text: | Change or use the tool mode. |
Registered by: | n/a |
Selects the tool or changes tool related global states.
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. |
Escape | Similar to Cancel but calling this action a second time will return to the Arrow tool. |
Stroke | If pcb-rnd 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. |
Syntax summary: | pcb_poly_morph(Object|Selected) |
---|---|
Help text: | Converts dead polygon islands into separate polygons. |
Registered by: | n/a |
If a polygon is divided into unconnected "islands", you can use this command to convert the otherwise disappeared islands into separate polygons. Be sure the cursor is over a portion of the polygon that remains visible. Very small islands that may flake off are automatically deleted.
Syntax summary: | MoveLayer(old,new) MoveLayer(lid,group,gid) |
---|---|
Help text: | Moves/Creates/Deletes Layers. |
Registered by: | n/a |
Moves a layer, creates a new layer, or deletes a layer.
Arguments:
old |
The is the layer number to act upon. Allowed values are:
|
---|---|
new |
Specifies where to move the layer to. Allowed values are:
|
Syntax summary: | pcb_move_obj(X,Y,[units]) |
---|---|
Help text: | Moves the object under the crosshair. |
Registered by: | n/a |
The code and Y are treated like delta if they are prefixed by + or -, otherwise, they are absolute. Units can be mil or mm and is used when X and Y have no unit specified. If no unit unspecified in coords or units, nanometer is assumed.
Syntax summary: | MoveToCurrentLayer(Object|SelectedObjects) |
---|---|
Help text: | Moves objects to the current layer. |
Registered by: | n/a |
Note that moving an subcircuit 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.
Syntax summary: | Net(find|select|rats|norats||ripup|addrats|clear[,net[,pin]]) Net(freeze|thaw|forcethaw) Net(swap) Net(add,net,pin)Net([rename|merge],srcnet,dstnet) |
---|---|
Help text: | Perform various actions on netlists. |
Registered by: | n/a |
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.
freeze , thaw and forcethaw temporarily prevents changes to the netlist from being reflected in the GUI. For example, if you need to make multiple changes, you freeze the netlist, make the changes, then thaw it. Note that freeze/thaw requests may nest, with the netlist being fully thawed only when all pending freezes are thawed. You can bypass the nesting by using forcethaw , which resets the freeze count and immediately updates the GUI.
Argument summary:
find | Nets which apply are marked @emph{found} and are drawn in the connected-color color. |
---|---|
select | Nets which apply are selected (added to existing selections). |
unselect | Nets which apply are unselected (removed from existing selections). |
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. |
clear | Clears the netlist. |
ripup | Remove all non-subcircuit-part copper object that is connected to a net. |
add | Add the given pin to the given netlist, creating either if needed. |
AddRats | Calculate and add all rats required for finishing the named network. |
swap | Swap the connections one end of two selected rats and pins. |
sort | Called after a list of add's, this sorts the netlist. |
freeze
thaw forcethaw | Temporarily prevents changes to the netlist from being reflected in the GUI. |
rename | Change the name of a network (with back annotation) |
merge | Move all terminal connections from the source network (first arg) to the destination network (with back annotation) |
Syntax summary: | New([name]) |
---|---|
Help text: | Starts a new layout. |
Registered by: | n/a |
If a name is not given, one is prompted for.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
The oneliner action is designed for quick execution of short, trivial scripts, such as a for loop for repeating an action. It supports any scripting language currently availabel through fungw. Each oneliner is an independent script context - variables, functions and other global states do not persist.
This group of actions offers three forms:
For example, a simple calculation using awk can be done in three ways:
Syntax summary: | OpenemsExcitation([interactive]) OpenemsExcitation(select, excitationname) OpenemsExcitation(set, [excitationnme], paramname, paramval) OpenemsExcitation(get, [excitationnme], paramname) |
---|---|
Help text: | Select which openEMS excitation method should be exported and manipulate the associated parameters. When invoked without arguments a dialog box with the same functionality is presented. |
Registered by: | openems HID |
When invoked without argument or with interactive a dialog box is presented, allowing the user to do the same operations as with the action.
If the first argument select , further OpenEMS exports will use the excitation named in the excitationname argument (in short: the excitation is selected).
Arguments set and get is used to read or change an excitation parameter named in paramname . When excitationname is not set, they operate on the currently selected excitation. For set the paramval argument is mandatory.
Note: the code remembers all settings for all excitements, not only the excitement that is currently selected. The selection and all parameters are saved as board attributes.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
Start or stop panning. To start call with Mode = 1, to stop call with Mode = 0.
Syntax summary: | PasteBuffer(AddSelected|Clear|1..PCB_MAX_BUFFER) PasteBuffer(Rotate, 1..3) PasteBuffer(Convert|Restore|Mirror) PasteBuffer(ToLayout, X, Y, units) PasteBuffer(ToLayout, crosshair) PasteBuffer(Save, Filename, [format], [force]) PasteBuffer(Push) PasteBuffer(Pop) |
---|---|
Help text: | Various operations on the paste buffer. |
Registered by: | n/a |
There are a number of paste buffers; the actual limit is a compile-time constant PCB_MAX_BUFFER . It is normally 5 . One of these is the "current" paste buffer, often referred to as "the" paste buffer. Arguments:
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 subcircuit. |
Restore | Convert any subcircuit in the paste buffer back to plain objects. |
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). |
Normalize | Set the buffer origin to the center of the paste buffer bounding box. This is useful especially if an import plugin loaded objects in the buffer with a large offset. |
Save | Saves any elements in the current buffer to the indicated file. If format is specified, try to use that file format, else use the default. If force is specified, overwrite target, don't ask. |
ToLayout | Pastes objects 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. If units is unspecified, units are PCB's internal units, currently nanometer. If "crosshair" is used instead of coordinates, the paste happens at the current crosshair coords. |
1..PCB_MAX_BUFFER | Selects the given buffer to be the current paste buffer. |
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | polycombine plugin |
The selected polygons are combined together according to the ordering of their points.
Syntax summary: | Polygon(Close|CloseHole|PreviousPoint) |
---|---|
Help text: | Some polygon related stuff. |
Registered by: | n/a |
Argument:
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. |
---|---|
CloseHole | Creates the final segment of the polygon hole. 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. |
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | polystitch plugin |
The polygon under the cursor (based on closest-corner) is stitched together with the polygon surrounding it on the same layer.
Use with pstoedit conversions where there's a "hole" in the shape - select the hole.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
This just pops up the specified menu. The menu must have been defined in the popups subtree in the menu lht file.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
preunload is an optional action scripts may provide. When present, it is called by pcb-rnd as the last call to the script before the script is unloaded. It has two purposes:
State persisting is achieved through returning a string from this action. That string is then saved by pcb-rnd under the scripts' load ID (as specified by the user). In a later script load, the script with the same ID may read the persistent data frolm disk using the scriptpersistency (read) action and can remove the save using the scriptpersistency (remove) action.
It should never be called by the user or other code or other actions.
Syntax summary: | Print() |
---|---|
Help text: | Present the print export dialog for printing the layout from the GUI. |
Registered by: | n/a |
Open an export dialog listing all printing plugins, prompt the user for their options, and print the layout.
Available only with GUI HIDs: it's merely a graphical shorthand that in turn calls the export plugin for printing.
Syntax summary: | PrintCalibrate() |
---|---|
Help text: | Calibrate the printer. |
Registered by: | dialogs plugin |
This will print a calibration page, which you would measure and type the measurements in, so that future printouts will be more precise.
Syntax summary: | PromptFor([message[,default[,title]]]) |
---|---|
Help text: | Prompt for a string. Returns the string (or NULL on cancel) |
Registered by: | n/a |
UI-independent way of asking the user for a string. When GUI is available, it is a dialog box, else it's console input. Return value, unlike with other actions, is a string. The return value is NULL on cancel.
Syntax summary: | pcb_act_Puller() |
---|---|
Help text: | Pull an arc-line junction tight. |
Registered by: | puller plugin |
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.
Syntax summary: | q |
---|---|
Help text: | Quits the application after confirming. |
Registered by: | shand_cmd plugin |
If you have unsaved changes, you will be prompted to confirm (or save) before quitting, unless the action name included a !.
Syntax summary: | Quit() |
---|---|
Help text: | Quits the application after confirming. |
Registered by: | n/a |
If you have unsaved changes, you will be prompted to confirm (or save) before quitting.
Syntax summary: | redo() |
---|---|
Help text: | Redo recent "undo" operations. |
Registered by: | n/a |
The redo action 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.
Syntax summary: | ReloadScript(id) |
---|---|
Help text: | Reload a fungw script |
Registered by: | script plugin |
id is the same that was specified for loadscript . If loading the new verison of the script fails, id is released (can be reused for a new LoadScript).
Syntax summary: | RenumberBlock(old_base,new_base) |
---|---|
Help text: | TODO |
Registered by: | renumber plugin |
Example: RenumberBlock(oldnum,newnum)
All selected elements are renumbered by adding (newnum-oldnum) to the existing number.
Example: RenumberBlock(100,200)
will change R213 to R313.
Syntax summary: | RenumberBlock(old_base,new_base) |
---|---|
Help text: | TODO |
Registered by: | renumber plugin |
Example: RenumberBuffer(oldnum,newnum)
Same as renumberblock , but the paste buffer is renumbered.
Syntax summary: | ReplaceFootprint([Selected|Object], [footprint], [dumb]) |
---|---|
Help text: | Replace the footprint of the selected components with the footprint specified. |
Registered by: | n/a |
Replace footprint(s) from the library or buffer, in-place (preserving the original subcircuit's location, rotation and metadata) and append the replacement to the back annotation changeset.
If first argument is selected , replace all selected subcircuits with the new footprint; if it is object , replace only one subcircuit, under the cursor.
If the second argument is a footprint name, load it from the library. If it is @buffer , use the subcircuit in the current buffer (there must be exactly 1 subcircuit in the buffer). If it is empty or not specified, the user is asked for a footprint.
If the third argument is dumb the location and rotation of the original subcircuit is not preserved (but all metadata and board side are preserved). A dumb replacement also omits creating back annotation.
Syntax summary: | Report(Object|DrillReport|FoundPins|NetLength|NetLengthTo|AllNetLengths|[,name]) |
---|---|
Help text: | Produce various report. |
Registered by: | report plugin |
Arguments:
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. |
NetLength | The name and length of the net under the crosshair will be reported to the message log. |
AllNetLengths | The name and length of the net under the crosshair will be reported to the message log. An optional parameter specifies mm, mil, pcb, or in units |
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
This is a shortcut for report ( Object ).
Syntax summary: | RipUp(All|Selected|Element) |
---|---|
Help text: | Ripup auto-routed tracks |
Registered by: | n/a |
Arguments:
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. |
Syntax summary: | rn [name] |
---|---|
Help text: | Reads netlist. |
Registered by: | shand_cmd plugin |
If no filename is given a file select box will pop up.
Syntax summary: | pcb_move_obj(steps) |
---|---|
Help text: | Rotates the object under the crosshair by 90 degree steps. |
Registered by: | n/a |
Rotates the object under the mouse pointer by 90 degree steps . steps must be an integer between -3 and +3.
Syntax summary: | s [name] w [name] |
---|---|
Help text: | Saves layout data. |
Registered by: | shand_cmd plugin |
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.
Syntax summary: | Save() Save(Layout|LayoutAs) Save(AllConnections|AllUnusedPins|ElementConnections) Save(PasteBuffer) |
---|---|
Help text: | Save layout data to a user-selected file. |
Registered by: | dialogs plugin |
This action is a GUI front-end to the core's saveto action. If you happen to pass a filename then saveto is called directly. Else, the user is prompted for a filename to save, and then saveto is called with that filename.
Syntax summary: | SaveTo(Layout|LayoutAs,filename,[fmt]) SaveTo(PasteBuffer,filename,[fmt]) |
---|---|
Help text: | Saves data to a file. |
Registered by: | n/a |
Arguments:
Layout | Saves the current layout. |
---|---|
LayoutAs | Saves the current layout, and remembers the filename used. |
PasteBuffer | Save the content of the active Buffer to a file. This is the graphical way to create a footprint. |
AllConnections, AllUnusedPins, ElementConnections | obsolete arguments, kept for compatibility; please use exportoldconn instead. |
Syntax summary: | ScriptCookie() |
---|---|
Help text: | Return a cookie specific to the current script instance during script initialization |
Registered by: | script plugin |
The script:
The function can not be called outside of script initialization. The cookie string can be used any time between script load and script unload.
Syntax summary: | ScriptPersistency(read|remove) |
---|---|
Help text: | Read or remove script persistency data savd on preunload |
Registered by: | script plugin |
When a script is unloaded, its action preunload is called. The return value is saved as script persistent data. When the script is loaded again later, it can use scriptpersistency ( read ) to read the data saved.
scriptpersistency ( remove ) deletes the data from disk.
Note: the data is per script id, not per script file name.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
Arguments:
up|down|left|right | Specifies the direction to scroll |
---|---|
div | Optional. Specifies how much to scroll by. The viewport is scrolled by 1/div of what is visible, so div = 1 scrolls a whole page. If not default is given, div=40. |
WARNING: available in the GTK HID only.
Syntax summary: | Select(Object|ToggleObject) Select(All|Block|Connection|Invert) Select(Convert) |
---|---|
Help text: | Toggles or sets the selection. |
Registered by: | n/a |
Arguments:
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 a subcircuit. This uses the highest numbered paste buffer. |
Invert | Invert selection: anything that was not selected becomes selected, everything that was selected becomes unselected. Locked objects are not affected. |
Syntax summary: | SelectLayer(1..MAXLAYER|Silk|Rats) |
---|---|
Help text: | Select which layer is the current layer. |
Registered by: | n/a |
The specified layer becomes the currently active layer. It is made visible if it is not already visible
Syntax summary: | SetFlag(Object|Selected|SelectedObjects, flag) SetFlag(SelectedLines|SelectedPins|SelectedVias, flag) SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag) SetFlag(SelectedElements, flag) flag = thermal | join |
---|---|
Help text: | Sets flags on objects. |
Registered by: | n/a |
Turns the given flag on, regardless of its previous setting. See changeflag .
Example: SetFlag(SelectedPins,thermal)
Syntax summary: | SetSame() |
---|---|
Help text: | Sets current layer and sizes to match indicated item. |
Registered by: | n/a |
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, clearance, etc) according to that item.
Syntax summary: | SetThermal(Object|SelectedPins|SelectedVias|Selected, Style) |
---|---|
Help text: | Set the thermal (on the current layer) of padstacks to the given style. Style = 0 means no thermal. Style = 1 has diagonal fingers with sharp edges. Style = 2 has horizontal and vertical fingers with sharp edges. Style = 3 is a solid connection to the plane. Style = 4 has diagonal fingers with rounded edges. Style = 5 has horizontal and vertical fingers with rounded edges. |
Registered by: | n/a |
This changes how/whether padstacks connect to any rectangle or polygon on the current layer. The first argument can specify one object, or all selected padstacks. The second argument specifies the style of connection.
Thermal styles:
0 | no connection, |
---|---|
1 | 45 degree fingers with sharp edges, |
2 | horizontal & vertical fingers with sharp edges, |
3 | solid connection, |
4 | 45 degree fingers with rounded corners, |
5 | horizontal & vertical fingers with rounded corners. |
Padstacks may have thermals whether or not there is a polygon available to connect with. However, they will have no visible effect until a polygon is drawn around the padstack.
Syntax summary: | SetUnits(mm|mil) |
---|---|
Help text: | Set the default measurement units. |
Registered by: | n/a |
mil | Sets the display units to mils (1/1000 inch). |
---|---|
mm | Sets the display units to millimeters. |
Syntax summary: | SetValue(Grid|Line|LineSize|Text|TextScale, delta) |
---|---|
Help text: | Change various board-wide values and sizes. |
Registered by: | n/a |
Arguments:
Grid | Sets the grid spacing. |
---|---|
Line
LineSize | Changes the thickness of new lines. |
Text
TextScale | Changes the size of new text. |
Syntax summary: | SmartDisperse([All|Selected]) |
---|---|
Help text: | Disperse subcircuits into clusters, by netlist connections |
Registered by: | smartdisperse plugin |
Improve the initial dispersion of subcircuits by choosing an order based on the netlist, rather than the arbitrary subcircuit order. This isn't the same as a global autoplace, it's more of a linear autoplace. It might make some useful local groupings. For example, you should not have to chase all over the board to find the resistor that goes with a given LED.
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
This action changes the way you view the board (flipping the board).
Arguments:
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 pcb_true silk, and which are drawn as the "invisible" layer. It also determines which solder mask you see.
If S is specified as a second argument, 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.
Syntax summary: | ToggleView(1..MAXLAYER) ToggleView(layername) ToggleView(Silk|Rats|Pins|Vias|BackSide) ToggleView(All, Open|Vis, Set|Clear|Toggle) |
---|---|
Help text: | Toggle the visibility of the specified layer or layer group. |
Registered by: | n/a |
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.
Syntax summary: | undo() undo(ClearList) |
---|---|
Help text: | Undo recent changes. |
Registered by: | n/a |
The unlimited undo feature of pcb-rnd allows you to recover from most operations that materially affect you work. Calling pcb_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 .
Note that undo groups operations by serial number; changes with the same serial number will be undone (or redone) as a group. See atomic .
Syntax summary: | UnloadScript(id) |
---|---|
Help text: | Unload a fungw script |
Registered by: | script plugin |
id is the same that was specified for loadscript . After the call id is released (can be reused for a new LoadScript).
Syntax summary: | Unselect(All|Block|Connection) |
---|---|
Help text: | Unselects the object at the pointer location or the specified objects. |
Registered by: | n/a |
Arguments:
All | Unselect all objects. |
---|---|
Block | Unselect all objects in a rectangle given by the cursor. |
Connection | Unselect all connections with the "found" flag set. |
Syntax summary: | s [name] w [name] |
---|---|
Help text: | Saves layout data. |
Registered by: | shand_cmd plugin |
This commands has been added for the convenience of vi users and has the same functionality as s .
Syntax summary: | wq |
---|---|
Help text: | Saves the layout data and quits. |
Registered by: | shand_cmd plugin |
This command has been added for the convenience of vi users and has the same functionality as s combined with q .
Syntax summary: | n/a |
---|---|
Help text: | n/a |
Registered by: | n/a |
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 + , - , = to change how the zoom factor is modified (relative or absolute). The factor is a floating point number, such as 1.5 or 0.75 .
Alternatively a box can be specified with 4 coordinates and zoom will set the zoom level (and modifies pan) so that the given box of the design is visible and as large as possible in the current window.
Arguments:
+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 @var{factor} is an absolute zoom factor; the unit for this value is "PCB units per screen pixel". Since PCB units are nanometer, a factor of 1000 means 1 micrometer per pixel (TODO: test this). |
x1, y1, x2, y2 | Zoom to the specified portion of the design, described as a rectangle (using board space coordinates) |
selected | Zoom and pan so that all selected objects are on the screen. |
found | Zoom and pan so that all found objects are on the screen. |
? | Print the current zoom level in the message log (as an info line). |
get | Return the zoom level as an FGW_DOUBLE (useful for scripts). |
Note that zoom factors of zero are silently ignored.