## Pcb-rnd Action Reference

pcb-rnd version 1.2.6, Revision: 13593
Action | Description | Syntax
--- | --- | ---
ElementSetAttr | Sets or clears an element-specific attribute. | ElementSetAttr(refdes,name[,value])
smartdisperse
PasteBuffer | Various operations on the paste buffer. | PasteBuffer(AddSelected|Clear|1..PCB_MAX_BUFFER) PasteBuffer(Rotate, 1..3) PasteBuffer(Convert|Restore|Mirror) PasteBuffer(ToLayout, X, Y, units) PasteBuffer(Save, Filename, [format], [force])
ChangeDrillSize | Changes the drilling hole size of objects. | ChangeDrillSize(Object, delta|style) ChangeDrillSize(SelectedPins|SelectedVias|Selected|SelectedObjects, delta|style)
LoadhypFrom | Loads the specified Hyperlynx file. | LoadhypFrom(filename[, "debug"]...)
SetOctagon | Sets the octagon-flag of objects. | SetOctagon(Object|ToggleObject|SelectedElements|Selected)
aligntext | Align Text Elements | AlignText(X/Y, [Lefts/Rights/Tops/Bottoms/Centers, [First/Last/pcb_crosshair/Average[, Gridless]]])

Display

Several display-related actions.

Display(NameOnPCB|Description|Value|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)

DeleteRats | Delete rat lines. | DeleteRats(AllRats|Selected|SelectedRats)
Cursor | Move the cursor. | Cursor(Type,DeltaUp,DeltaRight,Units)
dumpflags | dump flags, optionally using the format string provided by the user | dumpflags([fmt])
ChkBuffer | Return 1 if currently selected buffer's index matches idx | ChkBuffer(idx)
ChkMode | Return 1 if the currently selected mode is the expected_mode | ChkMode(expected_mode)
netlist | Perform various actions on netlists. | Net(find|select|rats|norats|clear[,net[,pin]]) Net(freeze|thaw|forcethaw) Net(swap) Net(add,net,pin)
DebugXY | Debug action, with coordinates | DebugXY(...)
PadstackEdit | interactive pad stack editor | PadstackEdit(object)
forcecolor | change selected element's color to #RRGGBB, reset if does not start with '#' | forcecolor(#RRGGBB)
LoadFontFrom | Load PCB font from a file | LoadFontFrom([file, id])
LoadFrom | Load layout data from a file. | LoadFrom(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename[,format])
ChangeAngle | Changes the start angle, delta angle or both angles of an arc. | ChangeAngle(Object, start|delta|both, delta) ChangeAngle(SelectedObjects|Selected, start|delta|both, delta) ChangeAngle(SelectedArcs, start|delta|both, delta)
ToggleView | Toggle the visibility of the specified layer or layer group. | ToggleView(1..MAXLAYER) ToggleView(layername) ToggleView(Silk|Rats|Pins|Vias|Mask|BackSide) ToggleView(All, Open|Vis, Set|Clear|Toggle)
DumpLibrary | Display the entire contents of the libraries. | DumpLibrary()
CreateText | Create a new text object | CreateText(layer, fontID, X, Y, direction, scale, text)
MarkCrosshair | Set/Reset the pcb_crosshair mark. | MarkCrosshair() MarkCrosshair(Center)
LoadTedaxFrom | Loads the specified block from a tedax file. Type can be: netlist or footprint. | LoadTedaxFrom(type, filename)
MoveToCurrentLayer | Moves objects to the current layer. | MoveToCurrentLayer(Object|SelectedObjects)

SetThermal

Set the thermal (on the current layer) of pins or vias 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.

SetThermal(Object|SelectedPins|SelectedVias|Selected, Style)

propedit | Run the property editor | propedit()
PadstackConvert | Convert selection or current buffer to padstack | PadstackConvert(buffer|selected, [originx, originy])
pscalib
EditLayer | Change a property or attribute of a layer. If the first argument starts with @, it is taken as the layer name to manipulate, else the action uses the current layer. Without arguments or if only a layer name is specified, interactive runs editing. | Editlayer([@layer], [name=text|auto=[0|1]|sub=[0|1])] Editlayer([@layer], attrib, key=value)
SetFlag | Sets flags on objects. | SetFlag(Object|Selected|SelectedObjects, flag) SetFlag(SelectedLines|SelectedPins|SelectedVias, flag) SetFlag(SelectedPads|SelectedTexts|SelectedNames, flag) SetFlag(SelectedElements, flag) flag = square | octagon | thermal | join
ClrFlag | Clears flags on objects. | ClrFlag(Object|Selected|SelectedObjects, flag) ClrFlag(SelectedLines|SelectedPins|SelectedVias, flag) ClrFlag(SelectedPads|SelectedTexts|SelectedNames, flag) ClrFlag(SelectedElements, flag) flag = square | octagon | thermal | join
PrintUsage | Print command line arguments of pcb-rnd or a plugin loaded. | PrintUsage() PrintUsage(plugin)
ClearSquare | Clears the square-flag of pins and pads. | ClearSquare(ToggleObject|SelectedElements|SelectedPins)
ChangeHole | Changes the hole flag of objects. | ChangeHole(ToggleObject|Object|SelectedVias|Selected)

conf

Perform various operations on the configuration tree.

conf(set, path, value, [role], [policy]) - change a config setting to an absolute value
conf(delta, path, value, [role], [policy]) - change a config setting by a delta value (numerics-only)
conf(toggle, path, [role]) - invert boolean value of a flag; if no role given, overwrite the highest prio config
conf(reset, role) - reset the in-memory lihata of a role
conf(iseq, path, value) - returns whether the value of a conf item matches value (for menu checked's)

Brave | Changes brave settings. | Brave() Brave(setting, on|off)
distributetext | Distribute Text Elements | DistributeText(Y, [Lefts/Rights/Tops/Bottoms/Centers/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
dlg_test | test the attribute dialog | dlg_test()
DumpActions | Dump all actions available. | DumpActions()
Attributes | Let the user edit the attributes of the layout, current or given layer, or selected element or subcircuit. | Attributes(Layout|Layer|Element|Subc) Attributes(Layer,layername)
RenumberBlock
ToggleHideName | Toggles the visibility of element names. | ToggleHideName(Object|SelectedElements)
RenumberBuffer
AutoRoute | Auto-route some or all rat lines. | AutoRoute(AllRats|SelectedRats)
ReplaceFootprint | Replace the footprint of the selected components with the footprint specified. | ReplaceFootprint()
net | Perform various actions on netlists. | Net(find|select|rats|norats|clear[,net[,pin]]) Net(freeze|thaw|forcethaw) Net(swap) Net(add,net,pin)
LoadFootprint | Loads a single footprint by name. | pcb_load_footprint(filename[,refdes,value])
OptAutoOnly | Toggles the optimize-only-autorouted flag. | OptAutoOnly()
New | Starts a new layout. | New([name])
RipUp | Ripup auto-routed tracks, or convert an element to parts. | RipUp(All|Selected|Element)
Import | Import schematics. | Import() Import([gnetlist|make[,source,source,...]]) Import(setnewpoint[,(mark|center|X,Y)]) Import(setdisperse,D,units)
DumpCsect | Print the cross-section of the board (layer stack) | DumpCsect()
Redo | Redo recent "undo" operations. | redo()
Export | Export the current layout, e.g. Export(png, --dpi, 600) | Export(exporter, [exporter-args])
FreeRotateBuffer | 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. | pcb_buffer_free_rotate([Angle])
BoardFlip
MoveLayer | Moves/Creates/Deletes Layers. | MoveLayer(old,new)
LoadHpglFrom | Loads the specified hpgl plot file to the current buffer | LoadHpglFrom(filename)
LibraryChanged | Tells the GUI that the libraries have changed. | LibraryChanged()
CreateMenu | Creates a new menu, popup (only path specified) or submenu (at least path and action are specified) | CreateMenu(path | path, action, mnemonic, accel, tooltip, cookie)
SavePatch | Save netlist patch for back annotation. | SavePatch(filename)
ChkGridUnits | Return 1 if currently selected grid unit matches the expected (normally mm or mil) | ChkGridUnits(expected)
mill | Calculate toolpath for milling away copper | mill()
ChangeSquare | Changes the square flag of pins and pads. | ChangeSquare(ToggleObject) ChangeSquare(SelectedElements|SelectedPins) ChangeSquare(Selected|SelectedObjects)
djopt | Perform various optimizations on the current board. | djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull) djopt(auto) - all of the above djopt(miter)
PrintCopyright | Print copyright notice. | PrintCopyright()
LoadLtspiceFrom | Loads the specified ltspice .net and .asc file - the netlist must be mentor netlist. | LoadLtspiceFrom(filename)
extedit | extedit(object|selected, [interactive|method]) | Invoke an external program to edit a specific part of the current board.
DumpPlugins | Print plugins loaded in a format digestable by scripts. | DumpPlugins()
SaveFontTo | Save PCB font to a file | SaveFontTo([file, id])
integrity | perform integrirty check on the current board and generate errors if needed | integrity()
ExecuteFile | Run actions from the given file. | ExecuteFile(filename)
ChangePinName | Sets the name of a specific pin on a specific element. | ChangePinName(ElementName,PinNumber,PinName)
RouteStyle | Copies the indicated routing style into the current sizes. | RouteStyle(1|2|3|4)
SwitchHID | Switch to another HID. | SwitchHID(lesstif|gtk|batch)
GlobalPuller | Pull all traces tight. | pcb_act_GlobalPuller()
SetSquare | sets the square-flag of objects. | SetSquare(ToggleObject|SelectedElements|SelectedPins)
Renumber | Renumber all elements. The changes will be recorded to filename for use in backannotating these changes to the schematic. | Renumber() Renumber(filename)
SaveTedax | Saves the specific type of data in a tEDAx file. Type can be: board-footprints | SaveTedax(type, filename)
RouteStylesChanged | Tells the GUI that the routing styles have changed. | RouteStylesChanged()
Polygon | Some polygon related stuff. | Polygon(Close|CloseHole|PreviousPoint)
autocrop | Autocrops the board dimensions to extants + margin | autocrop()
SelectLayer | Select which layer is the current layer. | SelectLayer(1..MAXLAYER|Silk|Rats)
distribute | Distribute Elements | Distribute(X/Y, [Lefts/Rights/Tops/Bottoms/Centers/Marks/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
Connection | Searches connections of the object at the cursor position. | Connection(Find|ResetLinesAndPolygons|ResetPinsAndVias|Reset)
query | Perform various queries on PCB data. | query(dump, expr) - dry run: compile and dump an expression
ChangeFlag | Sets or clears flags on objects. | 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
ListRotations
Report | Produce various report. | Report(Object|DrillReport|FoundPins|NetLength|AllNetLengths|[,name])
shape | Interactive shape generator. | shape()
Bell | Attempt to produce audible notification (e.g. beep the speaker). | Bell()
Undo | Undo recent changes. | undo() undo(ClearList)
CycleDrag | Cycle through which object is being dragged | CycleDrag()
EvalConf | Perform various operations on the configuration tree. | EvalConf(path) - evaluate a config path in different config sources to figure how it ended up in the native database
PrintVersion | Print version. | PrintVersion()
Teardrops
FontEdit | Convert the current font to a PCB for editing. | FontEdit()
regpoly | Generate regular polygon. Where is x;y and radius is either r or rx;ry. Rotation is in degrees. | regpoly([where,] corners, radius [,rotation])
Debug | Debug action. | Debug(...)
dumpconf | Perform various operations on the configuration tree. | dumpconf(native, [verbose], [prefix]) - dump the native (binary) config tree to stdout dumpconf(lihata, role, [prefix]) - dump in-memory lihata representation of a config tree
h | Print a help message for commands. | h
ApplyVendor | Applies the currently loaded vendor drill table to the current design. | ApplyVendor()
LayerBinding | Change the layer binding. | LayerBinding(object) LayerBinding(selected) LayerBinding(buffer)
Puller | Pull an arc-line junction tight. | pcb_act_Puller()
m | Loads a layout into the current buffer. | m [name]
l | Loads layout data. | l [name] [format]
Delete | Delete stuff. | Delete(Object|Selected) Delete(AllRats|SelectedRats)
q | Quits the application after confirming. | q
SetValue | Change various board-wide values and sizes. | SetValue(Grid|Line|LineSize|Text|TextScale|ViaDrillingHole|Via|ViaSize, delta)
s | Saves layout data. | s [name]
Message | Writes a message to the log window. | message(message)
Mode | Change or use the tool 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)
ChangeNonetlist | Changes the nonetlist flag of elements. | ChangeNonetlist(ToggleObject) ChangeNonetlist(SelectedElements) ChangeNonetlist(Selected|SelectedObjects)
w | Saves layout data. | w [name]
MoveObject | Moves the object under the crosshair. | pcb_move_obj(X,Y,dim)
DisperseElements | Disperses elements. | DisperseElements(All|Selected)
Atomic | Save or restore the undo serial number. | Atomic(Save|Restore|Close|Block)
Info
PadstackPlace | Place a pad stack (either proto_id, or if not specified, the default for style) | PadstackPlace([proto_id|default], [x, y])
dumplayers | Print info about each layer | dumplayers()
Backup | Backup the current layout - save using the same method that the timed backup function uses | Backup()
dumpfonts | Print info about fonts | dumpfonts()
circle | Generate a filled circle (zero length round cap line) | circle([where,] diameter)
d1 | debug action for development | d1()
FullScreen | Hide widgets to get edit area full screen | pcb_act_FullScreen(on|off|toggle)
ChkGridSize | Return 1 if the currently selected grid matches the expected_size. If argument is "none" return 1 if there is no grid. | ChkGridSize(expected_size) ChkGridSize(none)
LoadTinycadFrom | Loads the specified tinycad .net file - the netlist must be tinycad netlist output. | LoadTinycadFrom(filename)
ExecCommand | Runs a command. | ExecCommand(command)
PrintPaths | Print full paths and search paths. | PrintPaths()
ChkElementName | Return 1 if currently shown element label (name) type matches the expected | ChkElementName(1) - expect description ChkElementName(2) - expect refdes ChkElementName(3) - expect value
ReportObject | Report on the object under the crosshair | ReportObject()
SaveTo | Saves data to a file. | SaveTo(Layout|LayoutAs,filename) SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename) SaveTo(PasteBuffer,filename)
ChangeJoin | Changes the join (clearance through polygons) of objects. | ChangeJoin(ToggleObject|SelectedLines|SelectedArcs|Selected)
PCBChanged | Tells the GUI that the whole PCB has changed. The optional "revert"parameter can be used as a hint to the GUI that the same design is beingreloaded, and that it might keep some viewport settings | PCBChanged([revert])
Normalize | Move all objects within the drawing area, align the drawing to 0;0 | Normalize()
ChangeClearSize | Changes the clearance size of objects. | ChangeClearSize(Object, delta|style) ChangeClearSize(SelectedPins|SelectedPads|SelectedVias, delta|style) ChangeClearSize(SelectedLines|SelectedArcs, delta|style) ChangeClearSize(Selected|SelectedObjects, delta|style)
UnloadVendor | Unloads the current vendor drill mapping table. | UnloadVendor()
LoadVendorFrom | Loads the specified vendor lihata file. | LoadVendorFrom(filename)
LoadMentorFrom | Loads the specified Mentor Graphics Design Capture schematics flat .edf file. | LoadMentorFrom(filename)
propset | Change the named property of all selected objects to/by value | propset(name, value)
q! | Quits the application without confirming. | q!
Unselect | Unselects the object at the pointer location or the specified objects. | Unselect(All|Block|Connection) Unselect(ElementByName|ObjectByName|PadByName|PinByName) Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name) Unselect(TextByName|ViaByName) Unselect(TextByName|ViaByName, Name)
Return | Simulate a passing or failing action. | Return(0|1)
ChangeSize | Changes the size of objects. | 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)
PrintActions | Print all actions available. | PrintActions()
NetlistChanged | Tells the GUI that the netlist has changed. | NetlistChanged()
jostle | Move lines out of the way | Jostle(diameter)
ChangeOctagon | Changes the octagon-flag of pins and vias. | ChangeOctagon(Object|ToggleObject|SelectedObjects|Selected) ChangeOctagon(SelectedElements|SelectedPins|SelectedVias)
ToggleVendor | Toggles the state of automatic drill size mapping. | ToggleVendor()
RemoveMenu | Recursively removes a new menu, popup (only path specified) or submenu. | RemoveMenu(path|cookie)
FlagEdit | Change the layer binding. | FlagEdit(object)
Flip | Flip an element to the opposite side of the board. | Flip(Object|Selected|SelectedElements)
ChangeSizes | Changes all sizes of objects. | 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)
ManagePlugins | Manage plugins dialog. | ManagePlugins()
align | Align Elements | Align(X/Y, [Lefts/Rights/Tops/Bottoms/Centers/Marks, [First/Last/pcb_crosshair/Average[, Gridless]]])
dumpundo | Print info about fonts | dumpfonts()
PolyOffs | replicate the outer contour of the selected polygon(s) with growing or shrinking them by offset; the new polygon is drawn on the current layer | PolyOffs(offset)
le | Loads an element into the current buffer. | le [name]
MorphPolygon | Converts dead polygon islands into separate polygons. | pcb_poly_morph(Object|Selected)
ToPoly | convert a closed loop of lines and arcs into a polygon | ToPoly() ToPoly(outline)
AddRats | Add one or more rat lines to the board. | AddRats(AllRats|SelectedRats|Close)
roundrect | Generate a rectangle with round corners | roundrect([where,] width[;height] [,rx[;ry] [,rotation]])
LoadEeschemaFrom | Loads the specified eeschema .net file - the netlist must be an s-expression. | LoadEeschemaFrom(filename)
ElementList | Adds the given element if it doesn't already exist. | ElementList(Start|Done|Need,<refdes>,<footprint>,<value>)
AutoPlaceSelected | Auto-place selected components. | AutoPlaceSelected()
DRC | Invoke the DRC check. | DRC()
PolyHatch | hatch the selected polygon(s) with lines of the current style; lines are drawn on the current layer | PolyHatch([spacing], [combination of h|v|c]) PolyHatch(interactive)
rn | Reads netlist. | rn [name]
FontSave | Convert the current PCB back to a font. | FontSave()
EditGroup | Change a property or attribute of a layer group. If the first argument starts with @, it is taken as the group name to manipulate, else the action uses the current layer's group. Without arguments or if only a layer name is specified, interactive runs editing. | Editgroup([@group], [name=text|type=+bit|type=-bit])] Editlayer([@layer], attrib, key=value)
ExportScadPoly | exports all selected polygons to an openscad script; only the outmost contour of each poly is exported | ScadExportPoly(filename)
fp_rehash | Flush the library index; rescan all library search paths and rebuild the library index. Useful if there are changes in the library during a pcb-rnd session. | fp_rehash()
EnableVendor | Enables automatic drill size mapping. | EnableVendor()
Quit | Quits the application after confirming. | Quit()
LoadDsnFrom | Loads the specified routed dsn file. | LoadDsnFrom(filename)
ClearOctagon | Clears the octagon-flag of pins and vias. | ClearOctagon(ToggleObject|Object|SelectedObjects|Selected) ClearOctagon(SelectedElements|SelectedPins|SelectedVias)
RemoveSelected | Removes any selected objects. | pcb_remove_selected()
MinClearGap | Ensures that polygons are a minimum distance from objects. | MinClearGap(delta) MinClearGap(Selected, delta)
SetSame | Sets current layer and sizes to match indicated item. | SetSame()
wq | Saves the layout data and quits. | wq
ChangePaste | Changes the no paste flag of objects. | ChangePaste(ToggleObject|Object|SelectedPads|Selected)
Help
PolyCombine
DisableVendor | Disables automatic drill size mapping. | DisableVendor()
PolyStitch
Select | Toggles or sets the selection. | Select(Object|ToggleObject) Select(All|Block|Connection) Select(ElementByName|ObjectByName|PadByName|PinByName) Select(ElementByName|ObjectByName|PadByName|PinByName, Name) Select(TextByName|ViaByName|NetByName) Select(TextByName|ViaByName|NetByName, Name) Select(Convert)
MinMaskGap | Ensures the mask is a minimum distance from pins and pads. | MinMaskGap(delta) MinMaskGap(Selected, delta)
ChangeName | Sets the name (or pin number) of objects. | ChangeName(Object) ChangeName(Object|"Number") ChangeName(Layout|Layer)
LoadMucsFrom | Loads the specified mucs routing file. | LoadMucsFrom(filename)
DumpPluginDirs | Print plugins directories in a format digestable by scripts. | DumpPluginDirs()
GetStyle | Return integer index (>=0) of the currently active style or -1 if no style is selected (== custom style) | GetStyle()
ChangeRadius | Changes the width or height (radius) of an arc. | ChangeRadius(Object, width|x|height|y|both, delta) ChangeRadius(SelectedObjects|Selected, width|x|height|y|both, delta) ChangeRadius(SelectedArcs, width|x|height|y|both, delta)