API reference
The console commands, grouped by object. Arguments in brackets are optional. Ids are strings
("l3", "p5", "n2"); wherever an id is expected, the name given to the entity or node also works, and
getid("name") returns the id. Many commands that create something accept id= (to set the id) and name=.
Geometry — g
Entities
Command |
Description |
|---|---|
|
point |
|
line; |
|
circle |
|
counterclockwise arc from |
|
rectangle (grouped, with H/V) |
|
rectangle symmetric about the center |
Constraints
Command |
Description |
|---|---|
|
horizontal/vertical line (or two points) |
|
two lines |
|
line and arc/circle, or two arcs/circles |
|
equal lengths or radii |
|
two points at the same place |
|
point on the curve |
|
point at the middle of the line |
|
points symmetric about an axis |
|
same center |
|
pins/unpins a point |
|
frees curves attached to the Origin itself (older drawings) |
Dimensions and variables
Command |
Description |
|---|---|
|
distance (line, two points or point-line) |
|
horizontal/vertical distance |
|
radius and diameter |
|
angle between lines |
|
changes a dimension value (or expression) |
|
current value of a dimension |
|
creates or changes a variable |
|
deletes and renames variables |
Editing
Command |
Description |
|---|---|
|
trim: removes the piece of the curve containing the point |
|
deletes |
|
names an entity |
|
moves a point |
|
translates |
|
rotates |
|
changes the radius |
|
marks as construction |
|
associative offset and its distance |
|
associative mirror (axis |
|
linear pattern |
|
circular pattern |
|
changes a pattern |
|
groups and ungroups |
|
hides and shows a group |
Queries and problem
Command |
Returns / does |
|---|---|
|
the entity (dictionary) |
|
list of ids |
|
minimum distance between two entities |
|
area enclosed by the curves |
|
remaining degrees of freedom |
|
project length unit |
|
problem type and depth (planar) |
Mesh — m
Command |
Description |
|---|---|
|
creates or edits a material (σ in MS/m, Br in T; |
|
deletes, duplicates and restores the default |
|
creates or edits a circuit |
|
deletes |
|
assigns to the region containing the point; returns the area. Wire: |
|
list |
|
creates or edits a boundary |
|
applies a boundary to the curves |
|
element size in the region |
|
size along curves ( |
|
default size and mesh quality |
|
generates the mesh |
|
mesh nodes |
Boundary types for type=: dirichlet (A = value + a1·x + a2·y), neumann, mixed (c0, c1), periodic,
antiperiodic.
Solver — s
Command |
Description |
|---|---|
|
new physics (field, or circuit with |
|
sets the analysis (frequency in Hz, times in s) |
|
current of a circuit (or region) in this physics only; |
|
solves (generating the mesh first if needed) |
|
steady thermal physics, with the losses of physics |
|
ambient, convection, front/back faces and σ(T) |
|
condition on curves ( |
|
air channel: flow (m³/h) and inlet ( |
|
organization |
Results — r
Command |
Description |
|---|---|
|
new field view |
|
interpolated view (1 to 6) |
|
layer in a view (or plot over line) |
|
options of a layer or item |
|
new table |
|
table item |
|
time plot: variable, axis and, optionally, color, label, line type ( |
|
time plot: axis limits (t in ms; |
|
organization |
|
number of a result variable (at the shown instant, in transient) |
|
list |
|
transient: |
Integral quantities (for outputs=): surface — area, volume, intA, current, energy, bavg,
b2, loss, ironLoss, fx, fy, torque; line — length, flux, mmf, intB, intBn, bavg, fx,
fy, torque. All in SI units.
Schematic — c
Command |
Description |
|---|---|
|
new schematic |
|
component |
|
wire between terminals |
|
wire route |
|
editing |
Globals
help(), getid("name"), undo(), redo(), fit(), reset(). clear() and next_id(n) appear in the exported
script.