Please, PLEASE do not be dismayed by the number of commands available. Most of the time, you will only likely need a few of them, and the rest are available to “make simple things easy, and complex things possible”.
This is sort of the status of things. There is certainly more to come, including geometry drawing and manipulation commands.
Here are the current list of commands by category, all commands and help text, and all pre-defined user commands.
Commands By Category
r('ALL HELPCAT HELPALL')
Action: CLEARSELECT SETSELECT REJOIN
Attributes: ATTR NOTSELECTED INDEX SELECTED
Call: GETSTART CALLLIST GETEND CALL
Comparison: FILTERTYPE ISTYPE < =
Conversion: MIL LIST MILS DICT STRING SPLIT MM FLOAT
Draw: DRAWSEGMENTS DRAWPARAMS DRAWTEXT
Elements: DRAWINGS PADS MODULES TRACKS
Filter: EXTEND MATCHREFERENCE CONNECTED FILTER
Help: SEE HELPALL HELP SEEALL HELPCAT
Layer: ONLAYERS SETLAYER LAYERNUMS
Numeric: SUM * + - /
Programming:
Stack: APPEND SWAP PICK ZIP2 CLEAR COPYTOP POP
System: TIME
All Commands With Help Text
* (Category: Numeric)
[OPERAND1 OPERAND2] Return the the floating point OPERAND1 *
OPERAND2.
+ (Category: Numeric)
[OPERAND1 OPERAND2] Return the the floating point OPERAND1 +
OPERAND2.
- (Category: Numeric)
[OPERAND1 OPERAND2] Return the the floating point OPERAND1 -
OPERAND2.
/ (Category: Numeric)
[OPERAND1 OPERAND2] Return the the floating point OPERAND1 /
OPERAND2.
: (Category: Programming)
Begin the definition of a new command. This is the only
command in which arguments occur after the command. Command
definition ends with the semicolon (;). Run command SEEALL
for more examples.
< (Category: Comparison)
[LIST VALUE] Create a LIST of True/False values
corresponding to whether the values in LIST are less than
VALUE (for use prior to FILTER)
= (Category: Comparison)
[LIST VALUE] Create a LIST of True/False values
corresponding to whether the values in LIST equal to VALUE
(for use prior to FILTER)
APPEND (Category: Stack)
[OPERAND1 OPERAND2] Return LIST1 and LIST2 concatenated
together.
ATTR (Category: Attributes)
[objects attribute] Get specified python attribute of the
objects
CALL (Category: Call)
[LIST FUNCTION] Execute python FUNCTION on each member of
LIST. Return the list of results in the same order as the
original LIST.
CALLLIST (Category: Call)
[LIST FUNCTION] Execute python FUNCTION on each member of
LIST.The FUNCTION must return a list of items (this is
suitablefor MODULE FUNCTIONs such as GraphicalItems and
Pads.
CLEAR (Category: Stack)
Clear the stack.
CLEARSELECT (Category: Action)
[objects] Deselect the objects
CONNECTED (Category: Filter)
[WHOLE INITIAL] From objects in WHOLE, select those that are
connected to objects in iNITIAL (recursevely)
COPYTOP (Category: Stack)
Duplicate the top object on the stack.
DICT (Category: Conversion)
[KEYS VALUES] Create a dictionary from KEYS and VALUES
lists.
DRAWINGS (Category: Elements)
Get all top-level drawing objects (lines and text)
DRAWPARAMS (Category: Draw)
[THICKNESS WIDTH HEIGHT LAYER] Set drawing parameters for
future DRAW commands.
DRAWSEGMENTS (Category: Draw)
[POINTSLIST] Points list is interpreted as pairs of X/Y
values. Line segments aredrawn between all successive pairs
of points, creating a connected sequence of lines.This
command uses previously set DRAWPARAMS and the points are in
native units (nm) so using MM or MILS commands is suggested.
DRAWTEXT (Category: Draw)
[TEXT POSITION] Draws the TEXT at POSITION using previously
set DRAWPARAMS. Position is in native units (nm) so using MM
or MILS commands is suggested.
EXTEND (Category: Filter)
[LIST1 LIST2] Join LIST1 and LIST2
FILTER (Category: Filter)
[LIST1 TF_LIST] Retain objects in LIST1 where the
corresponding value in TF_LIST is True, not None, not zero,
and not zero length
FILTERTYPE (Category: Comparison)
[LIST TYPE] Retains objects in LIST that are of TYPE
FLOAT (Category: Conversion)
[OBJECT] Return OBJECT as a floating point value or list.
OBJECT can be a string, a comma separated list of values, a
list of strings, or list of numbers.
GETEND (Category: Call)
[LIST] Get the end wxPoint from the LIST of DRAWSEGMENTS.
GETSTART (Category: Call)
[LIST] Get the start wxPoint from the LIST of DRAWSEGMENTS.
HELP (Category: Help)
[COMMAND] Shows help for COMMAND. Precede the COMMAND by
single quote mark (') so that it doesn't execute.
HELPALL (Category: Help)
[COMMAND] Shows help for all commands.
HELPCAT (Category: Help)
[CATEGORY] Shows commands in CATEGORY. CATEGORY value of ALL
shows all categories.
INDEX (Category: Attributes)
[objects index] Select an item in the list of objects
ISTYPE (Category: Comparison)
[LIST TYPE] Create a LIST of True/False values corresponding
to whether the values in LIST are of TYPE (for use prior to
FILTER)
LAYERNUMS (Category: Layer)
[STRING] Get the layer numbers for each layer in comma
separated STRING.
LIST (Category: Conversion)
[OBJECT] Make OBJECT into a list (with only OBJECT in it).
MATCHREFERENCE (Category: Filter)
[MODULES REFERENCE] Filter the MODULES and retain only those
that match REFERENCE
MIL (Category: Conversion)
[OBJECT] Return OBJECT as a floating point value or list
converted from mils to native units (nm). OBJECT can be a
string, a comma separated list of values, a list of strings,
or list of numbers.
MILS (Category: Conversion)
[OBJECT] Return OBJECT as a floating point value or list
converted from mils to native units (nm). OBJECT can be a
string, a comma separated list of values, a list of strings,
or list of numbers.
MM (Category: Conversion)
[OBJECT] Return OBJECT as a floating point value or list
converted from mm to native units (nm). OBJECT can be a
string, a comma separated list of values, a list of strings,
or list of numbers.
MODULES (Category: Elements)
Get all modules
NOTSELECTED (Category: Attributes)
[objects] Get unselected objects
ONLAYERS (Category: Layer)
[LIST LAYERS] Retains the objects in LIST that exist on any
of the LAYERS.
PADS (Category: Elements)
Get all pads
PICK (Category: Stack)
[NUMBER] Copy the value that is NUMBER of objects deep in
the stack to the top of the stack.
Examples:
0 PICK - copies the top of the stack.
1 PICK - pushes a copy of the second item from the
top of the stack onto the top of the stack.
POP (Category: Stack)
Removes the top item on the stack.
REJOIN (Category: Action)
Using selected lines, move multiple connected lines to the
isolated line.
SEE (Category: Help)
[COMMAND] Shows previously-defined COMMAND from the user
dictionary. See the colon (:) command for more information.
SEEALL (Category: Help)
[COMMAND] Shows all previously-defined COMMANDs from the
user dictionary. See the colon (:) command for more
information.
SELECTED (Category: Attributes)
[objects] Get selected objects
SETLAYER (Category: Layer)
[OBJECTS LAYER] Moves all OBJECTS to LAYER.
SETSELECT (Category: Action)
[objects] Select the objects
SPLIT (Category: Conversion)
[STRING] Split STRING on commas into a list of strings
STRING (Category: Conversion)
[OBJECT] Convert OBJECT to a string.
SUM (Category: Numeric)
[LIST] Return the sum of all members in LIST.
SWAP (Category: Stack)
Switches the two top objects on the stack.
TIME (Category: System)
Returns the current system time as a string.
TRACKS (Category: Elements)
Get all tracks (including vias)
ZIP2 (Category: Stack)
[LIST1 LIST2] Creates a list with parallel objects in LIST1
and LIST2 together at the same index.
[]
All Pre-Defined User Commands
r('SEEALL')
: ALLMREFERENCE MODULES GetReference CALL ;
: ALLMTEXT MODULES GraphicalItems CALLLIST EDA_TEXT ISINSTANCE GetShownText CALL ;
: ALLMVALUE MODULES GetValue CALL ;
: CLEARALL
MODULES COPY GetReference CALL CLEARSELECT
COPY GetValue CALL CLEARSELECT
COPY GraphicalItems CALLLIST CLEARSELECT
CLEARSELECT
PADS CLEARSELECT
TRACKS CLEARSELECT
DRAWINGS CLEARSELECT
;
: CLEARSELECT ClearSelected CALL ;
: COPY 0 PICK ;
: NOT ' = ;
: SETSELECT SetSelected CALL ;
: TOPTEXT DRAWINGS EDA_TEXT ISINSTANCE ;