Assignment (=)
Gives a variable or a point a value: an expression, so whatever it is defined from, it follows.
Syntax
name=expression
name=expression,"description"
Pn=expression,"description",CONSTRUCTION
| Argument | Meaning |
|---|---|
| name | A variable's name (letters, digits and _; # first for a system variable), or P and a point's number. A new name makes a new variable or point. Variables are the whole drawing's; a point is the page's worked on (each page has its own). |
| expression | Its value: a number, a position [x,y], or any expression. |
| description | What it is for, shown in the Variables or Points panel (optional). |
| CONSTRUCTION | For a point: a construction point, not drawn with the other points or snapped to (optional). Left out, a point keeps whatever it was. See Points. |
Examples
DEPTH2=150,"Depth of the lid"
FLAP=DEPTH2/2
P4=[250,200],"Centre"
P5=P4+[0,FLAP]
P6=ALONG(P0,P2,100)
FLAP=40
P5 is 75 above P4. Changing FLAP to 40 then moves P5 to 40 above it, and everything drawn on P5 moves with it.
Notes
A variable or point given a new value that would break the drawing (say, an element whose ends would then be the same
point, or a name that is used before it is defined) is put back as it was, and the reason is shown in red.
Names are not case sensitive. System variables start with #, such as #U (the units) and #CL (the current
layer). L, W and D, the box's length, width and depth, are ordinary variables, with no #.
See also: RENAME, LABEL, Names: variables and points.