# CIMEX Macro Syntax and Commands for CimCAD and CimPACK for Windows

1. Macro Language Syntax
2. Macro Commands
3. Macro Commands No Longer Supported

## Macro Language Syntax

    coordinate  expression  operator  value  global-value  n

    filename  directory  item  item-list  item-type  section  section-list

    subroutine  subroutine-list  group  group-list  string  variable  variable-type

    argument  dimension  rgbcolor  bium

    coordinate:                                   Two numbers describing

                                                  a position in the current document:

                                                  X is horizontal pos, Y is vertical.

                                                  X and Y can be separated by comma or space.

            coordinate + coordinate               X1,Y1 + X2,Y2 = X1 + X2,Y1 + Y2

            coordinate – coordinate               X1,Y1 – X2,Y2 = X1 – X2,Y1 – Y2

            expression expression

            expression,expression

            NOW                                   The current position

            argument                              Macro argument that evaluates to a coordinate

            #C                                    Current cursor position

            variable                              Macro variable that evaluates to a coordinate

            START(item)                           Starting coordinate of item

            FINISH(item)                          Finishing coordinate of item

            CENTER(item)                          Center (focus) of arc or circle

            CORNER(item)                          For an arc, corner of relief radius

            MIDPOINT(item)                        Middle point on line

            INSERTION(item)                       Insertion point of subroutine (same as START for other types)

            POINT(coordinate)                     Nearest coordinate that’s an item end or start

            VPOINT(coordinate)                    Nearest “visible” point

            CLOSEST(coordinate)                   Closest point on a line

                                                  (skips items in hidden and “dot” sections)

                                                  NOTE: POINT, VPOINT and CLOSEST check param(1161)

            GRID(coordinate)

            INTERSECTION(coordinate)              Nearest intersection of two items.

            INTLINES(item item [n])               1st or 2nd intersection of lines

            ONLINE(item coordinate)               Closest point on line, possibly extended

            FRACTION(expression item)             Fractional distance along item

                                                  ex.: FRACTION(1/2 item) is the same as midpoint

            FRACTION(expression coordinate coordinate)    Fractional distance between two points

            BSTART(n item)                        Start of a bridge segment

            BFINISH(n item)                       End of a bridge segment

            HANDLE()                              Handle of current list (LAST)

            VIEW()                                Size of current view (i.e. screen), in pixels

            SCREEN_CENTER()                       Coordinate at center of current view

    expression:                                   Mathematical expression that evaluates to a single number

            [+ | -]value [operator value] ...

    operator:

            + | - | * | /                         Arithmetic plus, minus, multiplication, division

            !                                     In IF conditions: NOT

            $                                     Preprocessor lookup indicator

                                                  Substitutes contents of following variable

                                                  into syntax at macro interpretation time.

    value:                                        Single numeric values

                                                  (compare coordinate and string)

            constant                              A numeric “literal,” e.g. 2053, 0.25

                                                  NOTE: can be exponential: e.g. 3.5e-4

            variable                              A variable that evaluates to a single number

            expression

            global-value

            ABS(value)                            Absolute value

            MIN(value value)

            MAX(value value)

            MOD(value value)                      Modulus (remainder after division)

            ROUND(value value)

            SQRT(value)                           Square root

            TRUNCATE(value)                       Returns the truncated (integer) value

            SIN(value)                            Sine

            ASIN(value)                           Arcsine

            COS(value)                            Cosine

            ACOS(value)                           Arccosine

            TAN(value)                            Tangent

            ATAN(value)                           Arctangent.  Returns -90..+90

            ATAN2(y x)                            Arctangent.  Returns -180..+180

            ANGLE(coordinate coordinate)          Angle of a (not necessarily existent)

                                                  Line drawn between these points.

            DISTANCE(coordinate coordinate)       Distance between these points,

            PATH(item coordinate)                 Distance along item to coordinate.

            XVALUE(coordinate)                    Horizontal value of this point

            YVALUE(coordinate)                    Vertical value of this point

            ASCII(string)                         First character of string.

            SEARCH(string substring)              Index of substring, or 0 if substring not in string.

            RSEARCH(string substring)             Reverse search (finds last match)

            LENGTH(string)                        Number or characters

            EVAL(string)                          Numeric equivalent of input string (numerals and . only)

            FILEFORMAT(string)                    Numeric code identifying file format for filename or extension passed in.

                                                  0 = Unknown

                                                  1 = Cimex

                                                  2 = DDES

                                                  3 = CFF2

                                                  4 = Adobe Illustrator

                                                  5 = AutoCad (DXF only)

                                                  6 = AutoCad (DWG only)

                                                  7 = HPGL Plot

                                                  8 = NC

                                                  9 = DieCad

                                                  10 = Custom

            NPFILE(dir [ext])                     Returns the count of files in the given directory

            FILESIZE(filename)                    Size of the given file (bytes)

            AND(n n)                              Bitwise AND

            OR(n n)                               Bitwise OR

            XOR(n n)                              Bitwise XOR

            PLINE(n)                              Evaluates the given line of the file for its value.

            UNITS(filename)                       1 or 25.4

            HIDDEN(section)                       Returns flag indicating whether section

                                                  is currently hidden

            LOCKED(section)                       Returns flag indicating whether section

                                                  is currently locked

            ISINTERNAL()                          1 = true, 0 = false -> true if this document is an internal subroutine

            PARAM(n)                              Configuration file parameter value

                                                  (those that evaluate to numeric values)

                                                  (n is 0..500 for integers, 1000..1500

                                                  for unit-dependent reals, and 3000..3100

                                                  for unit-independent reals).

                                                  NOTE: Can be used to set as well as get.

                                                  If setting PARAM(n), change will not be

                                                  saved unless written to a file using

                                                  PARAM WRITE command.

            DISPLAY(n)                            Current display value of option n

            MAP(n)                                Plotter tool that pen n is mapped to

            PCOLOR(n)                             RGB color of pen n

            ICOLOR()                              Picks index color (attribute) from pop-up

            LENGTH(itemlist)                      The number of items in item list

            XSTART(item)                          X value of starting coordinate of item

            XFINISH(item)                         X value of finishing coordinate of item

            XCENTER(item)                         X value of center of arc or circle

            YSTART(item)                          Y value of starting coordinate of item

            YFINISH(item)                         Y value of finishing coordinate of item

            YCENTER(item)                         Y value of center of arc or circle

            ZSTART(item)

            ZFINISH(item)

            ZCENTER(item)

            BEGIN(item)                           Beginning angle

            END(item)                             Ending angle

            RADIUS(item)                          Arcs and circles only

            LENGTH(item)                          Length of item

            EXTENSION(n item)                     n = 1..4.

                                                  Returns the length of a dimension's extension

                                                  (that have the given extension)

            ATTRIBUTE(item)                       Line type ( 1=cut, 2=crease, 3=perf, etc.)

            CONSTRUCTION(item)                    Indicates whether item is a construction line

            SECTION(item)                         Section the item belongs to

            JUSTIFICATION(item)                   Justification (handle) of text/dim item

            WIDTH(item)                           Font width of text/dim item

            HEIGHT(item)                          Font height of text/dim item

            PEN(item)                             Index number of pen used to draw this item

            SCREEN(item)

            WINDOWED(item)                        Drawn off screen

            HIGHLITE(item)                        Current highlited status of item (0 if not highlited)

            COLOR(item)                           Index number of color used to draw this item

                                                  (not an rgbcolor)

            SCRATCH(item)

            STYLE(item)

            UNDO(item)                            Value (1 or 0) of item’s Undo flag

            ARROW(item)

            XMIRROR(item)

            YMIRROR(item)

            XSCALE(item)

            YSCALE(item)

            TOOL(item)

            SPECIAL(item)

            DASH(item)

            TWIST(item)

            TOLERANCE(item)

            RPOS(item)

            RFINISH(item)

            BRIDGES(item)

            BWIDTH(item)

            BWMULT(item)

            BSTYLE(item)

            BEND(item)

            BSPACE(item)

            POINTAGE(item)                        Cutting or drawing tool width

            PWIDTH(item)

            NIBBLE(item)

            VALUE(item)                           of a dimension

            RLAST(item)                           Reverse flag for any line in LAST

            RTEMP(item)                           Reverse flag for any line in TEMP

            GROUPNUMBER(item)                     Group number of item (0 if not a group)

            SUBNUMBER(item)                       Number of sub (assuming item is a sub)

            TOTALITEMCOUNT()                      Total number of items in document

            GETDOCID()

            RANDOM(expression)                    Random number between 0 and expression

            DIRTY()                               1 if document has been modified, else 0

            ISINTERNAL()                          1 if document is an internal sub

            PEEK()                                #K value of any queued event, -999 if nothing queued

    global-value:                                 Global variables that evaluate to

                                                  coordinates, values, strings, items, or sections

                                                  Always used for the same commonly needed values

            #A                                    Current angle

            #B                                    Last input string

            #C                                    Current cursor position

            #D                                    Current design filename

                                                  NOTE: Throws error if not defined -> use Title()

                                                  to get design's title (always present).

            #E                                    Current error or return code

            #F                                    Current drawing scale

            #G                                    1 if cursor in graphics area,

                                                  0 if in menu area

            #H                                    Last section

            #I                                    Current default increment between last item and new one

            #J                                    Menu jump number

            #K                                    Last keystroke code

            #L                                    Current line prompt number

            #M                                    Current dynamic menu ID

            #N                                    Next line number

            #O                                    FILE CURRENT name; "" if no FILE CURRENT

            #P                                    Most recently created item

            #Q                                    Application root directory

                                                  (e.g. C:\program files\cimex corporation\CimPack 10.2)

            #S                                    Current section number

            #T                                    Application temp directory

                                                  (e.g. C:\program files\cimex corporation\CimPack 10.2\temp)

            #U                                    Units factor (to convert to inches)

            #V                                    Application version number

                                                  (major.minor only - doesn't express revision numbers)

            #W                                    Default text height/width

            #X                                    Current X position

            #Y                                    Current Y position

            #Z                                    Current Z position

    n:                                            A whole number (integer), often one used

                                                  as an index into a list of any kind

            expression                            Any expression which

                                                  evaluates to whole number

                                                  (i.e. an integer expression).

    filename:

            string                                Any string which evaluates to

                                                  a valid filename (including path

                                                  if necessary)

    directory:

            string                                Any string which evaluates to

                                                  a valid pathname

    item:                                         Fundamental object drawn in the design

                                                  includes lines, arcs, circles, text items,

                                                  dimensions (see item types).

                                                  Included in the saved design file.

            expression                            Any expression which evaluates to a valid

                                                  item number in the current section

                                                  (does not have to be an integer)

            section/expression                    Item within given section

            variable                              Any variable which evaluates to an item

            argument                              Macro argument which evaluates to an item

            #P                                    Most recently created item

            *                                     NOTE: used only in IF clause (see item-list)

            [section]/expression:[section]/expression...

            [item]                                NOTE: [ and ] are actual characters

            ITEM(coordinate)                      Closest item to coordinate

            2ITEM(coordinate)                     Second closest item to coordinate

            VITEM(coordinate)                     Closest visible item to coordinate

            LINE(coordinate)                      Closest line (item types Straight, Arc, Circle)

            DIMENSION(coordinate)                 Closest dimension (item types Dim Text, NC)

            VDIMENSION(coordinate)                Closest visible dimension to coordinate

            TAIL(coordinate)                      Closest line attached at only one end

            LIMIT(item n)                         Line that passes through start or finish of item.

            PDIM(n)                               Parametric dimension

            SELECT(n)                             nth item in LAST (see item-list)

            TEMP(n)                               nth item in TEMP (see item-list)

    item-list:                                    A collection of items to be operated on

                                                  together or in sequence

            [LAST] [ [-]word ...] [IF [RECURSIVE] conditions]

                   LAST                           Most recent set of selected items

                   -                              Removes items from LAST rather than adding to

                   word:

                           section                All items in given section

                           item | ^item           ^ - reverse

                           [section|item]..[section|item] Range of sections or items

                           TEMP                   Extra, editable item-list

                           RANGE(n1 n2)           Subset of items in TEMP in

                                                  the range n1 through n2

                           LINK(item)             All items linked to the given item

                           CONTINUOUS(item)

                           CHAIN(coordinate coordinate)

                           BOX(coordinate coordinate)

                                                  All items which intersect the

                                                  given bounding box

                           ALL                    All non-hidden items

                           .ALL                   Includes all hidden or dot sections

                           NONE                   Can be used to clear selection

                           NOSUBS                 Subroutines ignored

                           DEFAULT                No longer supported

                   conditions:

                           Same as an IF statement. In an IF clause, * is a wild

                           character representing each item currently in the list.

    item-type:

            S                                     Straight

            CIR                                   Circle

            A                                     Arc

            DIM                                   Dimension

            TEX                                   Text

            NC                                    Numeric Code

            SUB                                   Subroutine or Group

            SLE                                   Slew

            DWE                                   Dwell

            HOL                                   Hole

    section:                                      A portion of a design to be

                                                  treated as a unit, while also manipulating

                                                  individual contents; contains 0 or more items.

                                                  Included in the saved design file.

            name                                  Name of section (up to 12 characters)

            !n                                    Section number

            { section }                           Makes the section so identified the “current” section

                                                  (i.e. the one to which any new items are added).

    section-list:                                 A collection of sections to be operated

                                                  upon either together or in sequence.

            [-]word ... [IF [!]EMPTY]

                   word:

                           section

                           [section]..[section]

                           ALL

                           NONE

                           DEFAULT

    subroutine:                                   A design saved as a separate file

                                                  outside the current design,

                                                  referenced from within the design.

                                                  Reference (external subroutine) or

                                                  copy (internal subroutine) saved in

                                                  design file.

            name                                  Name of subroutine (filename if external)

            !n                                    Subroutine number

    subroutine-list:                              A collection of subroutines to be operated

                                                  upon either together or in sequence

    group:                                        A group of items in a design persistently

                                                  tied together for being operated on together.

            name                                  Name of group (Group Name Root + Group Number).

    group-list:                                   A collection of groups to be operated

                                                  upon either together or in sequence

    string:                                       A series of ASCII characters readable as text

            substring

            substring[,substring,...]             Concatenation of strings

            substring:

                   element[:range]

                   element:

                           '...'                  Any literal string (e.g. ‘abc’)

                           "..."                  Any literal string (e.g. “abc”)

                           variable               Variable that evaluates to a string

                           #0 to #nnnn            String from language file (See Language.ini)

                           #B                     Last input string

                           #D                     Current design filename

                           #H                     Name of last section

                           #M                     Current dynamic menu ID

                           #O                     FILE CURRENT name; "" if no FILE CURRENT

                           #Q                     Application root directory

                           #T                     Application temp directory

                           Type(argument)         Returns the argument's Variable Type as 1-char string

                                                  Blank result (‘ ‘) if variable is unassigned (i.e. NULL)

                           VType(variable)        Returns variable’s Variable Type as 1-char string

                                                  Blank result (‘ ‘) if variable is unassigned (i.e. NULL)

                           Format(string [expression|string ...] )

                                                  Formatted print statement.  %s is a

                                                  marker that is replaced by a string

                                                  argument, and %f is replaced by a

                                                  value (numeric) argument.

                           FFormat(value [fraction [tolerance decimals [width]]])

                                                  'FractionFORMAT' eg.

                                                  FFORMMAT(V 64 .001 3 10)

                           SFormat(separator_string sexpr|vexpr [sexpr|vexpr]*)

                                                  'SeparatorFORMAT' uses

                                                  separator_string to separate out

                                                  each s|v-expression

                           CHR(n)                 ASCII character translation of number n

                           LOWER(string)          All-lowercase translation of string

                           UPPER(string)          All-uppercase translation of string

                           FIELD(string [n [del]])nth field of string as delimited by

                                                  any of the characters in the string del

                                                  n defaults to 1 (first field)

                                                  del defaults to spaces, tabs, and newlines

                           DATE(n [m])            Time and/or date

                           FDATE(n [m])           'FileDATE' -- when current design was saved

                           FDATE(n filename [m])  'FileDATE' -- date last modified

                                                  For all dates & times:

                                                         N = 1   abreviated format (Mon Apr 2 5:45:01 2001)

                                                         N = 2   2 digit date (e.g. 3/4/69)

                                                         N = 3   time (e.g. 12:23:08)

                                                         N = 4   4 digit date (e.g. 3/4/1969)

                                                         N = 5   SQL-compatible date/time (e.g. 2001/04/02 12:23:08)

                                                  M defaults to whatever is stored in param(132)

                                                         M = 0   month/day/year (US notation)

                                                         M = 1   day/month/year

                                                         M = 2   year/month/day

                           FileCreated(filename n [m])

                                                  Date/Time file was created

                                                  filename, n, and m work as in FDATE(n filename [m])

                           FileAccessed(filename n [m])

                                                  Date/Time file was last accessed for reading

                                                  filename, n, and m work as in FDATE(n filename [m])

                                                  NOTE: For systems using FAT (FAT16/FAT32) accessed timestamp may be

                                                  unreliable (e.g. time portion of date/time omitted).

                                                  Accessed timestamp is correctly supported by systems using NTFS.

                           Read(filename [n1 [n2]])

                                                  Reads line(s) read from file

                                                  (Line n1 alone, or lines n1 through n2)

                           Read(+filename [n1 [n2]])

                                                  Reads line(s) and keeps file

                                                  open for next READ(+ ...)

                           Read(+ [n1 [n2]])      Reads from previously opened file

                           Read(- [n1 [n2]])      Reads, then closes file

                           Bytes(filename n1 n2)  On EOF, #E set to count of bytes read

                           Environment(string)    Gets DOS environment variable

                           PFile(template [extension [n]])

                                                  'PickFILE': n is start position

                           PFile(name extension 10000+n)

                                                  name.ext at position n

                           PFile(@filelist)       filelist is a file containing names

                           PType([n n ...])       No longer supported

                           PSection([n])          Lets user pick a section from a dialog box

                           Param(n)               Configuration file parameter value

                                                  that evaluates to a string

                                                  (n = 2000..2999 for strings)

                           PDIM(n item)           Parametric dimension string; n is 1..6

                           PDIM(0 item)           Returns "3" or similar, if item is 3rd

                                                  DIM in .PARAMETRIC section

                           BType(item)            Bridge Type

                                                  C, L, R, D, or ' ' if no bridge

                           String(item | !n | coordinate)

                                                  String format of:

                                                  Item (including subroutine): Section/Number

                                                  Section: Section name

                                                  Coordinate: X,Y

                           Type(item)             Item's item-type as a string

                           Text(item)             If item-type = ‘TEXT’: text contents

                                                  ‘DIM’: text contents of dim

                                                  ‘SUB’: Subroutine filename

                                                  ‘NC’: –

                                                  Not valid for Straight, Arc, or Circle.

                           Face_Name(item)        The font face name associated

                                                  with the given item

                           Subtype(item)          If the item is a subroutine,

                                                  type of subroutine

                                                  (“internal” or “external”)

                           Message(id)            The given message string from

                                                  the current language file

                           SLine(filename ["title"])

                                                  'SelectLINE' shows user a

                                                  pick-list dialog where the

                                                  user can choose among the

                                                  items listed in filename

                           Description(n)         The description text for the

                                                  given map index

                           Title()                The current document's title

                                                  (e.g. "Design1.cim" or

                                                  "01-3413.cim – Sample")

                                                  Same as #D only if file has been saved.

                           Language()             The current language (e.g. "English")

                           Label()                The dynamic menu item jump label.

                           GroupNameRoot()        The root string of group item names

                           LongName(filename)     The filename expressed in absolute terms

                                                  (i.e. "c:\my documents\subs\subfile.cim")

                           ShortName(filename)    The filename expressed relative to the

                                                  current document (i.e. "subs\subfile.cim")

                           DosName(filename)      The 8.3 DOS-compatible filename

                                                  representation for the given filename

                                                  NOTE: filename MUST EXIST for this

                                                  function to succeed.

                           Slashes(string)        String translation where newlines are

                                                  converted to double backslashes "\\"

                           GetFileName([filefilter] [title])

                                                  Allows user to choose a filename

                                                  in a browse for filename dialog

                           FileVolume(string)     The volume portion of the

                                                  filename: e.g. "C:"

                           FileDirectory(string)  The directory portion of the

                                                  filename: e.g. "\My Documents\"

                           FileName(string)       The name portion of the

                                                  filename: e.g. "Design1"

                           FileExtension(string)  The extension portion of the

                                                  filename: e.g. ".CIM"

                           FileNameExtension(string)

                                                  The name and extension portion of

                                                  the filename: e.g. "Design1.CIM"

                           FilePath(string)       The full path portion of the

                                                  filename: e.g. "C:\My Documents\"

                           FilePathName(string)   The full path plus the name

                                                  portion of the filename: e.g.

                                                  "C:\My Documents\Design1"

                                                  NOTE: No filename extension (e.g. ".cim")

                           RootPath(string)       The root pathname of the given

                                                  path (e.g. "C:\" or "\\Server\Share\")

                   range:

                           [n1]..[n2]

    variable:                                     Temporary storage place for values,

                                                  coordinates, items, or sections

            A through Z                           Predefined global variable

            A1 through Z9                         Predefined global variable

            A% through Z%                         Predefined global variable

            A[n] through Z[n]                     Predefined global variable

                                                  (NOTE: [ and ] are actual characters)

            &varname                              Programmer-named variable (1-14 characters)

            varname                               Name of parameter passed to macro.

                                                  Written out in calling macro,

                                                  and at top of called macro only;

                                                  Subsequently in called macro, referenced

                                                  as #0 through #9 (see argument).

    { variable | global-value } = [ expression | string | item | coordinate ]

                                                  Variables or global values can be

                                                  Set to contain values of the appropriate type

                                                  (the types that global values can hold

                                                  are strictly determined; not so for variables)

    variable type:

            V                                     Indicated variable contains a value

            S                                     Indicated variable contains a string

            C                                     Indicated variable contains a coordinate

            I                                     Indicated variable contains an item

    argument:                                     Macro argument passed to current macro.

            #0 through #9                         Numbered from the order in which they are named

                                                  at the top of the macro file (0 first).

    dimension:

            item                                  Item used as a label, e.g. for distances,

                                                  angles, radii, comments.  May contain

                                                  text, arrows, or both.

    rgbcolor:

            value                                 Red-Green-Blue color

                                                  Generally in range 0-255*256*256

                                                  (0-255 for each color).

                                                  Basic formula 256*256*r + 256*g + b.

                                                  e.g. Red=0, Green=100, Blue=255

                                                  would be 256*100 + 255.

                                                  256*256*256*32 for undefined,

                                                  256*256*256*16 for automatic.

    bium:

            value                                 Bold/Italic/Underline/

                                                  Multi-Line Justification

                                                  BIUM = bold + italic*4 + underline*16 + multi*64

                                                  For each value (Bold/Italic/Underline):

                                                  0 is off, 1 is on, 2 is undefined

                                                  For multi-line justification:

                                                  0 is undefined, 1 left, 2 center, 3 right

## Macro Commands

    Draw Lines       A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

    Line Drawing      Arcs  Straights

    { arc } [options ...]                         Create an item of type arc

            arc:

                   { TO | BY } coordinate RADIUS expression

                    { TO | BY } coordinate THROUGH coordinate

                   { TO | BY } coordinate { BEGIN | END } expression

                   { TO | BY } coordinate { XCENTER | YCENTER } expression

                   RADIUS expression BEGIN expression END expression

                   RADIUS expression BEGIN expression { XTO | XBY | YTO | YBY } expression

                   RADIUS expression { XCEN | YCEN } expression { XTO | XBY | YTO | YBY } expression

                   RADIUS expression { XCENTER | YCENTER } expression END expression

                   CENTER coordinate END expression

                   CENTER coordinate { XTO | XBY | YTO | YBY } expression

            options:

                   FROM coordinate | XFROM expression | YFROM expression

                   MOVE

                   REVERSE

                   BLEND expression | BLEND STRAIGHT

                   RADIUS + | RADIUS -

                   TO NEAR coordinate | XTO NEAR expression | YTO NEAR expression

                   CENTER NEAR coordinate | { XCENTER | YCENTER } NEAR expression

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   BRIDGES n

                   BWIDTH expression

                   BSTYLE n

                   BREND expression

                   BSPACE expression

                   POINTAGE n | PWIDTH expression

                   ZFROM expression

                   { ZTO | ZBY } expression

    { straight } [options ...]                    Create an item of type straight

            straight:

                   TO coordinate | XTO expression | YTO expression

                   BY coordinate | XBY expression | YBY expression

                   AT expression LENGTH expression

                   AT expression { XTO | YTO | XBY | YBY } expression

            options:

                   FROM coordinate | XFROM expression | YFROM expression

                   MOVE

                   REVERSE

                   BLEND expression

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   BRIDGES n

                   BWIDTH expression

                   BSTYLE n

                   BREND expression

                   BSPACE expression

                   POINTAGE n | PWIDTH expression

                   ZFROM expression

                   { ZTO | ZBY } expression

    A           ASCII AUTOSAVE

    ASCII OUT [item-list] [filename] [OVERWRITE]  Prints out item list with attributes.

    AUTOSAVE time [filename]                      Set time interval for Autosave.

    B           BELL  BEND  BYE

    BELL [freq [length] | ON | OFF]               Make sound.

                                                  Values of freq and length do

                                                  not change frequency or

                                                  duration of tone.

    BEND item

    BEND { START | FINISH } item [THROUGH coordinate] [TO coordinate]

                                                  Bend designated item.

                                                  Without START or FINISH, BEND leaves

                                                  endpoints in their original places.

            START                                 Grab from starting end

            FINISH                                Grab from ending end

            THROUGH                               Bend must pass through this point.

                                                  (Must use with START or FINISH.)

            TO                                    Bend must pass through this point

                                                  (if no START or FINISH)

                                                  or terminate at this point.

    BYE                                           Leaves application without saving changes.

    C           CFF2  CHANGE  CIRCLE  CLEAR  CLIP  CLOSE  COMMON  COPY  CURSOR

    CFF2                                          See DDES

    CHANGE item-list options ...

            options:

                   FACE string                    Face name

                   TWIST expression               Text rotation

                   BIUM bium                      Bold/Italic/Underline/

                                                  Multi-Line Justification

                   COLOR rgbcolor

                   WIDTH expression               No longer supported

                   HEIGHT expression              Height of text

                   ARROW expression

                   SLANT expression

                   JUSTIFICATION n

                   STYLE n                        Dimension style

                   PEN n                          No longer supported

                   STRING string                  Text contents

                   SUBROUTINE subroutine          Assign to named subroutine

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   TOOL n

                   CONSTRUCTION [NO]

                   POINTAGE n | PWIDTH expression

                   BRIDGES DEFAULT

                   BRIDGES n

                   BWIDTH expression

                   BSTYLE n

                   BREND expression

                   BSPACE expression

                   BADD coordinate

                   BDEL coordinate

                   BTYPE 'C' | 'L' | 'R' | 'D'    Applies only with BADD,

                                                  specifies type of bridge: center (normal),

                                                  or left/right/double tack

                   BFIX                           Converts all bridges to fixed positions

                   PDIM                           Fixes currently displayed parametric text

                   SCRATCH n                      NOTE: SCRATCH currently changed by: pan/zoom,

                                                  overlay, common, stretch, drag, tpc, tail(), temp

                                                  remove, and item() if dimensions exist

                   BEGIN a

                   DWELL time

    CIRCLE coordinate { RADIUS | DIAMETER } expression [options ...]

                                                  Create circle with center at coordinate

                                                  and radius or diameter of

                                                  value of expression.

            options:

                   BEGIN expression

                   REVERSE

                   BLEND expression | BLEND STRAIGHT

                   FROM coordinate

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   BRIDGES n

                   BWIDTH expression

                   BSTYLE n

                   BREND expression

                   BSPACE expression

                   POINTAGE n | PWIDTH expression

                   ZPOSITION expression

    CLEAR [ option ]                              Clear the graphics area

                                                  or the specified area.

            options:

                   VARIABLES

                   QUEUE

                   SECTIONS

                   TABLET

                    FUNCTIONS

    CLIP {IN | OUT [VARS | BITMAP] | CLEAR | TEXTOUT }

            IN                                    Read from clipboard

            OUT                                   Store LAST to clipboard without

                                                  global variables

            OUT VARS                              Store LAST and global variables to clipboard

            OUT BITMAP                            Store bitmap of current design view

                                                  to clipboard.

            CLEAR                                 Clear clipboard

            TEXTOUT string                        Store block of text to clipboard

            CLOSE                                 Closes the current document

                                                  (WARNING: does not save,

                                                  does not ask user to save)

    CLOSE                                         Close current document

    COMMON item-list [options ...]                Overlap detection and repair.

            options:

                   TOLERANCE expression           Minimum size overlap to flag/fix.

                                                  Not only overlaps, but lines shorter

                                                  than this will be ignored.

                   MINIMUM expression             Minimum length new line to create during fix.

                   NOBRIDGES                      Don’t add bridges while fixing.

                   MISMATCHED n                   Create points (dwells) of attribute n for mismatched lines

                   CROSSES n                      Create points of attribute n, instead of repairing

                   SECTION sec                    Macro will handle the crosses (points)

            Examples:

                    COMMON (no mismatch or cross arguments)

                      Sets #E to 5377 if overlaps processed, 0 if none detected

                    COMMON . . . MISMATCHED M

                      processes any matching lines, for mismatched pointage/attribute does not process those lines

                      if mismatches found sets #E to 195 and creates crosses of attribute M

                      if not found, #E will be 5377 or 0

                    COMMON . . . CROSSES C

                      does not process any lines.

                      creates crosses of attribute C if overlaps found, #E will be 5377 or 0

                    COMMON . . . MISMATCHED M CROSSES C

                      does not process any lines

                      creates crosses where overlaps found, which will be attribute M or C

                      #E will be 195 or 5377 or 0

                     If SECTION specified, all crosses will be created in that section, and left

                     for the macro to handle.

                     If SECTION not specified, crosses will be handled automatically with a dialog,

                     and left in section WARN_CROSSES if requested.

                     Anything previously in WARN_CROSSES will be deleted

    COPY item-list [options ...]

            options:

                   FROM coordinate | XFROM expression | YFROM expression

                   TO coordinate | XTO expression | YTO expression

                   BY coordinate | XBY expression | YBY expression

                   TWIST expression

                   SCALE expression

                   { XSCALE | YSCALE } expression

                   NEGATE { X | Y }

                   TIMES n

                   REVERSE

                   SELECT

                   NOARCS

                   ZFROM expression

                   { ZTO | ZBY } expression

                   NEGATE Z

                   ZSCALE expression

                   { XTWIST | YTWIST } expression

    CURSOR { WAIT | ARROW }        Turns on or off the egg-timer cursor.

    D           DB  DDES  DEFAULT  DELETE  DEVICE  DIALOG  DIMENS  DIR  DISPLAY

                DRAG  DS  DWELL  DXF

    DB SETUP { action } [ scope ] drivername optionstring [ options ]

            actions:

                   ADD                            Adds the given DSN.

                   EDIT                           Edits the options for a given DSN.

                   DELETE                         Removes the given DSN.

            scope:

                   USER                           Applies the action to a user DSN.

                   SYSTEM                         Applies the action to the system-wide DSN (default if scope is not specified).

            options:

                   NOPROMPT                       Suppresses any dialogs from popping up.  The user will not see any dialogs to confirm changes, or to make additional configuration changes to the DSN.

           Notes:

    drivername is the name of the ODBC DBMS driver (e.g. “Microsoft Access Driver (*.mdb)”)

    optionstring are the driver-specific set of configuration options, each separated by a vertical bar (e.g. “DSN=Cimex Waterjet Data|DBQ=C:\Cimex Files\WaterJetDB\db1.mdb”)

    DB OPEN tablename [options...]                Opens specified database table

            options:

                   SOURCE datasourcename          ODBC data source name to connect to

                                                  (default = param(2082))

                   USER username                  User name to log in to database with

                   PASSWORD password              Password to log in to database with

                   TAG fieldname                  Field name to use with seek commands

                   NOPROMPT                       Disallows ODBC from showing a

                                                  database login dialog.

                                                  NOTE: Use this option if you've included

                                                  all of the information necessary to

                                                  connect to the database in your macro,

                                                  and failure should mean that something is

                                                  wrong, not that some information is missing.

                   REMEMBER                       Records any extra information provided

                                                  by the user in order to log into the database,

                                                  and then uses that data in future calls to

                                                  open when REMEMBER is again specified.

                                                  This insures that the user need only login

                                                  once for any run of the application, and that

                                                  all future database opens proceed using

                                                  the credentials previously provided.

    DB CREATE RECORD                              Creates a blank record in memory for the

                                                  macro to write to for the next update

    DB DELETE RECORD                              Deletes the current record from database

    DB TAG fieldname                              Field name to use with seek commands

    DB SEEK { string | value }                    Select record(s) whose tag is

                                                  equal to the given string or value.

    DB WHERE sql_conditions                       Select record(s) using the

                                                  given SQL where clause conditions

    DB GOTO { position }                          Sets current record within current data set

            position:

                   FIRST | TOP                    Uses first record in data set

                   NEXT                           Uses next one

                   PREVIOUS                       Uses previous one

                   LAST | BOTTOM                  Uses last one

                   INDEX n                        Use given index (1,2,3…)

    DB READ dbfieldname FILE filename             Copy current database record field into file

    DB READ dbfieldname [type] variable [options]

                                                  Copy current database record

                                                  field into variable

            type:

                   STRING                         Treat as string data

                   VALUE                          Treat as numeric data

                   AUTO                           Determine type based on database field type

                                                  (this is the default if no type is specified).

            options:

                   NULL                           If the db field is null, then

                                                  the variable is also set to null

                   DEFAULT default_value          If the db field is null, then the variable is

                                                  set to the given default value.

                   <blank>                       Without specifying NULL or DEFAULT, set the

                                                  variable to blank or zero,

                                                  depending on the DB field type

    DB WRITE dbfieldname FILE filename            Copy the contents of the file

                                                  into the given field

    DB WRITE dbfieldname [type] { string | value }

                                                  Copy variable value into

                                                  current database record field

            type:

                   STRING                         Puts the given string into the DB field

                   VALUE                          Puts the given numeric value into the DB field

                   AUTO                           Puts the given string or value into the DB field

                                                  (type is determined automatically --

                                                  this is the default if no type is specified)

    DB UPDATE                                     Writes out all changes to database (the record is either updated or inserted,

                                                  depending on if the current record was selected from the database, or if it was created new)

    DB INSERT                                     Inserts the current record data into the database as a new record

    DB CLOSE                                      Close the database.

    DB GET SOURCE &dsn                            Current data source name

    DB GET TABLE &table                           Current table name

    DB GET TAG &tag                               Current tag field name

    DB GET COUNT &count                           Number of records in current data set

    DB GET POSITION &position                     Index into the current data set

    DB GET UPDATEMODE &mode                       Gets current update mode: INSERT, UPDATE, or <blank> depending on the state of the current db record

    { DDES | CFF2 } OUT [item-list] [filename] [options ...]

            options:

                   NAME string

                   COMMENTS filename

                   NOCORNERS

                   NOBRIDGES

                   NOMAP

                   OVERWRITE

    DEFAULT

    DEFAULT DIRECTORY [STRING variable]           Returns current directory

    DEFAULT DIRECTORY SAVE string                 Saves existing, and switches to new

    DEFAULT DIRECTORY NEW directory               Changes current directory

    DEFAULT HEIGHT [expression]

    DEFAULT JUSTIFICATION [n]

    DEFAULT POINTAGE [n] | PWIDTH [expression]

    DEFAULT BWIDTH [expression]                   Display/Set bridge width

    DEFAULT ATTRIBUTE [n]

    DEFAULT CONSTRUCTION [YES | NO]

    DEFAULT SCROLLBARS [ ON | OFF ]

    DEFAULT DRAW   [expression]                   Display/set drawing flags

    DELETE item-list                              Delete the items in the item-list.

                                                  Changes current line number prompt.

    DEVICE OUTPUT|WINDOWS|7470|HP|7475|7570|7585|DT|DMP

                                                  (Deprecated) Configures the

                                                  current plotter to be of the given type

    DEVICE device [option]

            devices:

                   DIGITIZER ON|OFF               Turns on or off the digitizer

                   PLOTTER LOAD <logical plotter name>|CURRENT

                                                  Loads the given or current logical plotter.

                                                  By default loads both hardware

                                                  and logical settings.

                   PLOTTER SAVE [CURRENT]         Saves the current logical plotter.

                                                  Optionally makes this one the default

                                                  for its device class.

                                                  By default saves logical settings only.

                   PRINTER LOAD <logical plotter name>|CURRENT

                                                  Loads the given or current logical printer.

                                                  By default loads both hardware

                                                  and logical settings.

                   PRINTER SAVE [CURRENT]         Saves the current logical printer.

                                                  Optionally makes this one the default

                                                  for its device class.

                                                  By default saves logical settings only.

                   SAMPLEMAKER LOAD <logical plotter name>|CURRENT

                                                  Loads the given or current logical samplemaker.

                                                  By default loads both hardware

                                                  and logical settings.

                   SAMPLEMAKER SAVE [CURRENT]     Saves the current logical plotter.

                                                  Optionally makes this one the default

                                                  for its device class.

                                                  By default saves logical settings only.

            options:

                   HARDWARE                       Load or save hardware settings

                   LOGICAL                        Load or save logical settings

                   BOTH                           Load or save both hardware and

                                                  logical settings

    DIALOG dialogtype [TITLE dlgTitle]            Display Windows dialog & fetch input from user.

                                                  Most dialogtypes below can handle TITLE keyword.

    DIALOG dialogtype

            dialogtype:

                   ATTRIBUTE                      User chooses line attributes

                   PENMAP                         User edits drawing mappings (color, dash, etc.)

                                                  for various line sets

                   SECTIONS                       User edits section list in current file

    DIALOG dialogtype string [INFORMATION | WARNING | ERROR ]

            dialogtype:

                   MESSAGE                        Display message (OK button)

                   MSG                            Display message (OK button)

                   CONFIRM                        Ask OK or Cancel

                   OKCANCEL                       Ask OK or Cancel

                   YESNO                          Ask Yes or No

                   YESNOCANCEL                    Ask Yes, No, or Cancel

    DIALOG OPEN { options…}                       User selects file to open

            options:

                   PREVIEW prevFileName           Allow preview and name file to store preview list

                   NOPREVIEW                      Disable preview

                   READONLY                       Returns read-only flag.

                   NOREADONLY                     Hide read-only checkbox

                   DIR initPath                   Initial path

                   NOCHANGEDIR                    Browsing should not change working directory.

                   DEFAULT defFilename            Default filename

                   EXTENSIONS extensions          Space-delimited string of Language file

                                                  IDs of permissible file types

                   PATH path                      Returns user filename with path.

                   LINE line                      Returns line number in preview set.

    DIALOG SAVE { options… }                      User saves file

            options:

                   DIR initPath                   Initial path

                   NOCHANGEDIR                    Browsing should not change working directory.

                   DEFAULT defFilename            Default filename

                   EXTENSIONS extensions          Space-delimited string of Language file IDs

                                                  of permissible file types

                   TYPE extIndex filetypeFilter   Returns index to extension list determining

                                                  file type of new file, and “save as” type.

                   PATH path                      Returns user filename with path.

                   SNAPSHOT snap                  Returns whether user wants non-CIM snapshot

                                                  (“Y” or empty string).

    DIALOG FOLDER { options }                     User selects directory

            options:

                   PATH path                      Returns folder path (not a filename).

                   FILTERS filterstring           Similar to EXTENSIONS under DIALOG OPEN/SAVE

    DIALOG FONT { options… }                      User selects font attributes

            options:

                   NOTWIST                        Disable Twist (Angle) control

                   NOHANDLE                       Disable Just (Handle) control

                   NOMLJ                          Disable Multi-Line Justification control

    DIALOG dialogtype [RANGE rangevar]            rangevar returns range.

            Dialogtype:

                   PRINT                          Print current design dialog

                   PLOT                           Plot current design dialog

                   SAMPLE                         Sample Create property sheet (Does not use RANGE)

    DIALOG DISPLAY id [options...]                Sets the given dialog as the current one

                                                  (displays the given dialog for the user to

                                                  interact with)

            options:

                   RESET                          Clears all of the contents of the

                                                  various fields (radio buttons, check

                                                  boxes, edit fields) (default)

                   NORESET                        Doesn't clear any field

                                                  (except for edit fields which are

                                                  always cleared regardless of this option)

                   SMART                          Does a RESET if the previous displayed

                                                  dialog was not this one,

                                                  otherwise does a NORESET.

                   NOINITVARS                     Suppresses the initialization

                                                  of the automatic variables

                                                  (so that the dialog uses the

                                                  ones that the macro must have defined)

            sub-commands:                         Any additional dialog commands can be

                                                  supplied here (see below)

                                                  (e.g. DIALOG DISPLAY main DISABLE - esc).

    DIALOG TITLE string                           Set heading for dialog

    DIALOG GET fieldname {STRING|VALUE} variable  Sets the variable to the contents of the given dialog

                                                  item (defaults to string contents if VALUE not specified)

    DIALOG GET combobox INDEX variable            Sets the variable to the combo box's currently selected index number

    DIALOG GET combobox LIST filename [APPEND]    Stores the combo box's list into the given filename

                                                  (optionally appends to the given file)

    DIALOG SET fieldname [STRING|VALUE] [string|value]

                                                  Sets the dialog item to the given value

    DIALOG SET combobox INDEX integer             Sets the combo box to select

                                                  the contents of its list box at given index

    DIALOG SET combobox LIST filename [options...]

                                                  Sets the combo box's list to

                                                  be the contents of the given file

            options:

                   NODELETE                       Doesn't delete the given filename

                                                  (by default, we do delete the file)

                   MERGE                          Appends the contents of the file

                                                  to the list (by default, we replace the

                                                  drop-list with the file's contents)

    DIALOG SET fieldname AUTO [value|string]      Automatically handles whether the input

                                                  is a string or value.

    DIALOG [command] fields                       Modify field(s) in currently active dialog

            commands:

                   FOCUS                          Place cursor in this field

                   ENABLE                         Enables the given field(s)

                   DISABLE                        Disables the given field(s)

                                                  (note that disabled fields look grayed-out)

                   SHOW                           Un-hides given hidden field(s)

                   HIDE                           Hides the given field(s)

                   CHECK                          Checks checkbox, or toggles button to depressed.

                   UNCHECK                        Clears checkbox, or toggles button to popped-out.

                   HIGHLIGHT

                   UNHIGHLIGHT

                   LOCK                           Locks field's value (makes it read-only)

                   UNLOCK                         Unlocks field's value (makes it writeable)

            fields:

                   *                              All fields

                   - field_id [field_id...]       Negation specifier - MUST be first

                                                  in list (means: "all except following")

                   field_id [field_id...]         Listed by individual field ID

                                                  (e.g. DIALOG LOCK *  <- locks all fields,

                                                  DIALOG DISABLE - esc  <- would disable

                                                  everything but the item with the ID 'esc')

    DIALOG JUMP <label-prefix>                    Waits for the user to interact

                                                  with the dialog, and jumps to the given

                                                  <label-prefix.dialog-item-id> when the

                                                  user interacts with a given dialog item.

    DIALOG CLOSE                                  Close the current dialog

    DIALOG LOAD filename [sub-commands...]        Loads the given dynamic dialog file (if not already loaded)

    DIMENS string [options ...]                   Add a text or measurement

                                                  indicator dimension

            options:

                   STYLE n

                   EXTEND expression [expression expression expression]

                   POSITION coordinate

                   FROM coordinate

                   TO coordinate | BY coordinate | XTO expression |

                           YTO expression | XBY expression | YBY expression

                   RADIUS expression

                   WIDTH expression

                   HEIGHT expression

                   ARROW expression

                   JUSTIFICATION n

                   HANDLE n                       Handle of length n

                   ATTRIBUTE n

                   FACE_NAME string               Name of typeface

                   BIUM bium                      Bold/Italic/Underline/

                                                  Multi-line Justification

                   SPECIAL n                      No longer supported

                   DASH n                         No longer supported

                   CONSTRUCTION [NO]

            STYLE is:

                   1                              Linear, Horizontal

                   2                              Linear, Angled

    3                              Linear, Offset

    5                              Angle

                   11                             Small Radius

                   12                             Large Radius

    13                             Small Diameter

    14                             Large Diameter

                   21                             Y ordinate

                   22                             X-Horizontal ordinate

                   23                             X-Vertical ordinate

                   25                             Annotations w/ Arrow, Arrow + dog-leg

                   26                             Plain, no arrow

                   30                             Origin

                   50                             ‘Regular’(used for parametrics)

                   51                             Tolerance notation (used for parametrics)

                   52                             Limits notation (used for parametrics)

                   0,99                           Invisible

    DIR mask_string [VOLUME] [PATH] [NAME] [EXTENSION]

                                                  Sends the directory listing

                                                  to current output.

    DISPLAY [item-list] [options ...]             Displays the selection with options set.

                                                  If an option is not specified, its default

                                                  setting (which may not be its current one)

                                                  is used and restored.  Also, if no item-list

                                                  is specified, ALL is assumed. Compare REDISPLAY.

                                                  NOTE: can be abbreviated to D

            options:

                   position-option

                   draw-option [NO]               Turns option on or [NO] off.  Subsequent uses

                                                  of DISPLAY restore the default of an option.

                                                  Compare REDISPLAY.

            position-option:

                   SCALE expression

                   SIZE expression

                   SAME

                   WINDOW

                   JUSTIFICATION n

                   POSITION coordinate

                   AT expression expression

                   CENTER

                   CORNER [n]

                   TOLERANCE expression

            draw-option:

                   HIGH1 | HIGH2 | HIGH3 | HIGH4

                   ARROWS | NUMBERS | SECTIONS | CROSS

                   ENDS | EDGES | DASHES | BRIDGES

                   CBRIDGES | PNUMBERS | SUBNAMES

                   ORIGIN | GRID | CON | POINTAGE

                   FLOOD | OVERLAPS | PDIM | DTR

                   DIMS | SUBDIMS | TEXT | SUBTEXT

                   FLAGS

            Other-options:

                   TOLERANCE expression

                   PDIM n

                   FLAGS n                n contains all the draw-options as bit flags

    DRAG [selection] [options...] [AND selection [scales...] ]...

                                                  NOTE: there can be up to 3 AND clauses

            selection:

                   item-list                      Handle is at middle

                   START item                     Handle at start end

                   FINISH item                    Handle at tail end

                   LIMITS coordinate [coordinate]

            options:

                   HANDLE coordinate

                   FROM coordinate

                   TWIST

                   SCALE

                   NOLINE                         Disables rubber-band line

                   OFFSET expression

                   MIRROR

                   ROTATE

                   PROMPT

                   KEY

                   HISTORY expression

                   NOTIFY

                   DIGITIZER

                   CURSOR {X|Y}                   Use only X or Y value of cursor to drag.

            scales:

                   XSCALE expression

                   YSCALE expression

                   ORTHOGONAL angle

                   PARALLEL angle

    DS section-list                               Delete sections from section list,

                                                  including all items they contain.

    DWELL [expression] [options ...]              Add a dwell mark item. Expression gives the length of the dwell,

                                                  Or creates a point (cross) if 0.

            options:

                   POSITION coordinate | XPOSITION expression | YPOSITION expression

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   ZPOSITION expression

    DXF IN [options ...]                          Read a DXF format file into CIM application.

            options:

                   CURRENT                        Read into current subroutine,

                                                  instead of into main

                   NUMERIC string                 Add given string to numeric

                                                  layers

    DXF OUT [item-list] filename [options ...]    Write a CIM file or contents to a DXF format file.

            options:

                   OVERWRITE

                   BRIDGES

                   POINTAGES

                   NOSECTIONS

                   TYPES

                   NOPOLYLINE

    E           EDGE  ELSE  ERASE  EXIT  EXPLODE  EXTEND

    EDGE item-list FROM coordinate                If not a closed shape,

                                                  selects all the lines up to

                                                  the dead-end, and errors.

    ELSE                                          See IF

    ERASE item-list                               Like DELETE, but doesn't

                                                  change current line number prompt.

    EXIT [n]                                      Exits setting #E to n.

    EXPLODE LINE subroutine [...][SPECIAL n1 n2...]      Explodes single lines from subroutine.

    EXPLODE sub-list [options...]                 Explodes selected subroutines into

                                                  their component items.

    EXPLODE group-list [options...]               Ungroups selected groups into their

                                                  component items.

            options:

                   [SEC sec1 sec2 ...]            Explodes selected sections

                                                  into current section.

                   [RETAIN sec1 sec2 ...]         Explodes subroutines while retaining

                                                  original section names.

                   [SINGLE]                       Explodes subroutines which

                                                  are used only once

                   [SELECT]                       Select exploded lines

                   [SPECIAL n1 n2...]             Convert attrib/special descriptions

                                                  from the subroutine to corresponding

                                                  pairs in the main design.

                                                  NOTE: If SELECT and SPECIAL are both used,

                                                  SPECIAL must be last.

    EXTEND item [option]

            options:

                   LENGTH expression              Extends an arc or straight

                   END n [LENGTH expression]      Extends a dimension

                   KEY

                   NOTIFY                         Allow notification of status-bar changes

                   PROMPT

                   DIGITIZE

                   HISTORY expression

    F           FCOPY  FI  FILE  FOLLOW  FONT  FRENAME

    FCOPY source destination                      Copy the source file to the destination

                                                  (overwrite if it already exists)

    FI                                            See IF

    FILE CURRENT                                  Return to working on main design

    FILE { subroutine | group } CURRENT           Work on a subroutine (or group)

    FILE [sub-list]  [LIST]                        Displays Subroutine info

    FILE [group-list] GROUPS                      Displays Group info

    FILE { sub-list | group-list } { command }    Note: Only some FILE commands work on groups

            command:

                   INTERNAL                       Make listed subroutines internal

                   EXTERNAL [PATH pathname]       Make listed subroutines external [in designated folder]

                   DISCARD [GROUPS]               Discard any unreferenced subs (or groups)

                   SAVE [OVERWRITE [LIST]]        Write subroutines to disc

                   RESTORE [LIST]                 Read subroutines from disc

                   EXISTS [PATH pathname][NOWARN] Check if files exist on disc [in designated folder].

                                                  (Warning message if true, unless NOWARN.)

                   RENAME basename                Rename subroutines as basenameA,

                                                  basenameB, etc.

                   COUNT varname [GROUPS]         Fetch the total number of uses

                                                  for these subroutines (or groups).

                                                  (1 or 0 for groups)

    FILE subroutine { command }

            command:

                   SAVE AS filename [OVERWRITE] [LIST]

                                                  Saves internal or external

                                                  subroutine with a new filename.

                   TYPE varname                   Fetch “internal” or “external” into varname

    FOLLOW [ ON | OFF | DISPLAY | PLOTTER ]       Controls screen updates

    FONT SET [options...] variable                Set font to value of variable

            options:

                   FACE_NAME string

                   HEIGHT expression              Text size in current units

                   COLOR rgbcolor                 RGB text color

                   BIUM bium                      Bold/Italic/Underline/MLJ

                   JUST n                         Handle for pivot point

                   TWIST expression               Angled printing in radians

                                                  999=undefined

    FONT GET [options...] variable                Fetch font setting into variable

            options:

                   FACE_NAME                      '' for undefined

                   HEIGHT                         Text size in current units

                   COLOR                          RGB text color

                   BIUM                           Bold/Italic/Underline/

                                                  Multi-Line Justification

                   JUST                           Handle for pivot point

                   TWIST                          Angled printing in radians

                                                  999=undefined

    FRENAME oldfile newfile [OVERWRITE]           Renames the given file

    G           GAPS  GET  GRADE  GRID  GUI

    GAPS  { SHOW | CLOSE } expression [item-list] Shows, by creating points (zero length dwells),

                                                  or closes gaps smaller than the specified amount.

                                                  Gaps may be between end-points or at T-junctions

                                                  (between end of one line and middle of another line).

    GET [options...]                              Waits for keystroke or mouse, returns in #K

            options:

                   NOTIFY                         #K can include codes other than keystrokes and

                                                  mouse clicks (e.g. status bar actions)

                   PROMPT                         Enable current prompt

                   HISTORY id                     Set history list (by ID)

                   SHOWDEFAULT string             Set given default string in current prompt

                                                  (Does not accept or override default)

                   DIGITIZING                     Activate digitizing

    GRADE item-list FROM list1 TO list2

    GRID                                          Display grid size(s)

    GRID [x [y]]                                  Set grid size(s)

    GRID { ON | OFF }                             No longer supported

    GUI {command}                                 Adjust Graphical User Interface (GUI)

            commands:

                   SNAP { ON | OFF | ENABLE | DISABLE }

                                                  Snap-to-grid button

                   LINK { ON | OFF | ENABLE | DISABLE }

                                                  Link/Line button

                   DUPLICATE { ON | OFF | ENABLE | DISABLE }

                                                  Copy/Move button

                   TOOLBAR id { ON | OFF }        Toolbar of that id (integer)

                   COLOR { ENABLE | DISABLE }

                   SECTION { ENABLE | DISABLE }

                   POINTAGE { ENABLE | DISABLE }

                   TAB [ COLOR | DUPLICATE ]

                   REGISTER string                Register file extensions with Explorer.

                   SPLASH { KILL | TIMEOUT }      Kill splash screen now, or set a timeout.

                   MRU n                          Set Most-Recently-Used list to a max of n.

                   FILEMRU { subcommand }

                      subcommands:

                       WRITE filename [APPEND]    Writes the current file MRU list to the given file.

    H           HELP  HIDE  HIGHLITE  HOLE  HOTKEY

    HELP { command }

            commands:

                   CONTEXT mapID                 Set help context to topic in Help file

                                                  identified by number mapID.

                   INIT [COMPILED] filename       No-op kept for backward compatibility

                   LANGUAGE filename              No-op kept for backward compatibility

                   MESSAGE n                      No-op kept for backward compatibility

                   CLEAR                          No-op kept for backward compatibility

                   ON                             No-op kept for backward compatibility

                   OFF                            No-op kept for backward compatibility

                   END                            No-op kept for backward compatibility

    HIDE item-list                                Hides items.

                                                  To undo, see SUPERIMPOSE

    HIGHLITE [n] SELECT [REC]                     Highlight (n=0..4)

    HIGHLITE CLEAR                                Redraw highlighted lines as regular

    HOLE coordinate { RADIUS | DIAMETER } expression [options ...]

            options:

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   ZPOSITION expression

    HOTKEY [options…]

            options:

                   PROMPT

                   HISTORY filename               Name of a macro file

                   NOTIFY

                   DIGITIZER

                   LEVEL n

    I           IF  INCREMENT  INTERSECT  ITEM

    IF test macro-commands                        Conditional macro command execution

            [ ELSE IF test macro-commands ]...    Executed if first test fails

            [ ELSE macro-commands ]               Executed if all previous tests fail

    FI                                            FI terminates the IF command sequence

            test:

                   condition [conjunction condition [...]]

            conditions:

                   expression comparison-operator expression

                   string comparison-operator string

                   coordinate { = | <> } coordinate

                   item { = | <> } item

                   [!]ESCAPE                      True if an escape condition

                                                  was previously triggered (but

                                                  not yet tested for)

                   [!]PROMPTCLICK                 true if last event was a click into the prompt edit bar

                   [!]KEYBOARD                    true if last event was a keyboard event

                   [!]CURSOR

                   [!]PDIM                        true if we’re in parametrics mode

                   [!]INPUT

                   [!]MENU AREA

                   [!]MENU TEST n                 Waits for key, then compares with menu n

                   [!]EXISTS path                 True if the given path is

                                                  found to exist (file/folder)

                   [!]REMOTE path                 True if the given path is a

                                                  remote path [or not].

                   [!]REMOVABLE path              True if given path is on a

                                                  removable volume (e.g. a zip disk)

                   [!]DRAWPOINTAGE                true if currently drawing/displaying in Pointage mode

            comparison-operators:

                   =                              The two operands are equal

                   <>                             The two operands are not equal

                   >                              Left operand greater than right

                   <                              Left operand less than left

                   >=                             Left operand greater than or equal to right

                   <=                             Left operand less than or equal to right

            conjunctions:

                   &                              AND (both or all conditions are true)

                   |                              OR (either or any condition is true)

    INCREMENT expression

    INTERSECT line line [NOT] [NEAR coordinate | XNEAR expression | YNEAR expression]

            line:

                   [KEEP] [EXTEND] item           NOTE: Without KEEP, half of each line is discarded.

                                                  The line direction is important.

                   INT KEEP line1 KEEP line2      Sets NOW to the intersection point

    ITEM { FIRST | LAST }                         Controls which of two identical

                                                  items is found by ITEM(coordinate)

    J           JOIN  JOURNAL  JUMP

    [JOIN line line] BLEND { expression | STRAIGHT } [options ...]

    JOIN line TO coordinate BLEND { expression | STRAIGHT } [options ...]

    JOIN line FROM coordinate BLEND { expression | STRAIGHT } [options ...]

    JOIN line BLEND { expression | STRAIGHT } [options ...]

            line:

                   [KEEP] [EXTEND] item

            options:

                   [NOT] NEAR coordinate

                   [NOT] { XNEAR | YNEAR } expression

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   TOLERANCE expression

    JOURNAL                                       Toggle macro-trace journaling.

    JOURNAL [ON | OFF]                            No longer supported; toggle takes

                                                  place, keywords not read.

    JOURNAL [MACRO] filename [OVERWRITE]          No longer supported; toggle takes

                                                  place, keywords not read.

    JUMP

    JUMP [+|-] n                                  Reroute macro execution to

                                                  line n lines ahead of (+) or

                                                  behind (-) current line.

    JUMP <label> [YRT ...]                        Reroute macro execution to

                                                  line marked by <label>.

                                                  NOTE: If you JUMP out of a

                                                  TRY/RECOVER/YRT block, you

                                                  must append the JUMP command

                                                  with the appropriate number

                                                  of YRTs (depending on whether

                                                  and how deeply the TRY

                                                  statements were nested).

    K           KEEP

    KEEP coordinate [ITEM item]                   Opposite of TRIM:

                                                  Keep nearest segment & discard rest of line.

                                                  Same as K hotkey.

                                                  ITEM forces which line to keep.

    L           L  LA  LB  LIBRARY  LIST  LP  LS  LT  LV  LZ

    L [NOHEADING] [item-list]                     = LIST etc.

    LA [NOHEADING] [item-list]                    = LIST ATTRIBUTES etc.

    LB [NOHEADING] [item-list]                    = LIST BRIDGES etc.

    LIBRARY [directory ...]                       Shows/sets up library directory

    LIST [option] [NOHEADING] [item-list]         List items

            options:

                   ATTRIBUTES                     Also can use LA

                   BRIDGES                        Also can use LB

                   NIBBLES

                   HEIGHTS                        Also can use LZ

    LP [RECURSIVE] option                         Lists sorted list of items requested.

            options:

                   ATTRIBUTE

                   POINTAGE

                   LENGTH

                   RADIUS

                   BRIDGES

                   BWIDTH

    LS [NOHEADING] [section-list | subroutine]    List sections

    LT [NOHEADING] [item-list]                    List TEXT and NCTEXT items

    LV [variables] [&name*]                       List variables to file

    LZ [NOHEADING] [item-list]                    = LIST HEIGHTS etc.

    M           MACRO  MAP  MENU  MD  MERGE  MKDIR  MOUSE

    MACRO [ CHAIN | MAC_LEVEL ] filename [options ...]

                                                  Execute macro script file

            options:

                   POSITION coordinate

                   SCALE expression

                   TWIST expression

                   NEGATE { X | Y }

    MAP [DISPLAY|PLOT] expression [options ...]   Set or display logical pen attributes

            options:

                   COPY expression                Copy all except DESC & FLAGS

                   COLOR rgbcolor

                   WIDTH expression               in inches

                   STYLE expression               0, 1, ...

                   DASH expression                in inches

                   TOOL expression                0, 1, ...

                   DESCRIPTION string

                   FLAGS expression

    MD                                            See MKDIR

    MENU {LOAD|INIT} filename [sub-commands...]   Loads the given dynamic menu

                                                  file (if not already loaded)

    MENU DISPLAY id [options...]                  Sets the given menu as the current one

                                                  (displays the given menu for the user to

                                                  interact with)

            options:

                   RESET                          Clears all of the contents of the

                                                  various fields (radio buttons, check

                                                  boxes, edit fields) (default)

                   NORESET                        Doesn't clear any field

                                                  (except for edit fields which are

                                                  always cleared regardless of this option)

                   SMART                          Does a RESET if the previous displayed

                                                  menu was not this one,

                                                  otherwise does a NORESET.

                   NOINITVARS                     Suppresses the initialization

                                                  of the automatic variables

                                                  (so that the menu uses the

                                                  ones that the macro must have defined)

            sub-commands:                         Any additional menu commands can be

                                                  supplied here (see below)

                                                  (e.g. MENU DISPLAY main DISABLE - esc).

    MENU JUMP <label-prefix>                      Waits for the user to interact

                                                  with the menu, and jumps to the given

                                                  <label-prefix.menu-item-id> when the

                                                  user interacts with a given menu item.

                                                  <label-prefix.*> can be used to catch any

                                                  menu-item-id which has no label of its own.

    MENU {command}

            commands:

                   CLEAR                          Clears the dynamic menu

                                                  display (shows the empty, or blank menu)

                   RESET                          Resets the contents of the menu

                                                  (i.e. erases text fields,

                                                  resets check boxes, etc.)

                   NOFOCUS                        Forces the Windows(tm) focus

                                                  back to the document, away

                                                  from the menu.

    MENU GET fieldname [STRING|VALUE] variable    Sets the variable to the

                                                  contents of the given menu

                                                  item (defaults to string

                                                  contents if VALUE not specified)

    MENU GET combobox INDEX variable              Sets the variable to the

                                                  combo box's current selection index

    MENU GET combobox LIST filename [APPEND]      Stores the combo box's list

                                                  into the given filename

                                                  (optionally appends to the given file)

    MENU SET fieldname [STRING|VALUE] string_or_value

                                                  Sets the menu item to the given value

    MENU SET combobox INDEX integer               Sets the combo box to select

                                                  the contents of its list box at given index

    MENU SET combobox LIST filename [options...]  Sets the combo box's list to

                                                  be the contents of the given file

            options:

                   NODELETE                       Doesn't delete the given filename

                                                  (by default, we do delete the file)

                   MERGE                          Appends the contents of the file

                                                  to the list (by default, we replace the

                                                  drop-list with the file's contents)

    MENU SET fieldname AUTO [value|string]        Automatically handles whether the input

                                                  is a string or value.

    MENU ID variable                              Retrieves the currently displayed menu ID

                                                  into the given variable (menu IDs are strings)

    MENU {command} fields

            commands:

                   ENABLE                         Enables the given field(s)

                   DISABLE                        Disables the given field(s)

                                                  (note that disabled fields look grayed-out)

                   SHOW                           Un-hides given hidden field(s)

                   HIDE                           Hides the given field(s)

                   CHECK                          Checks checkbox, or toggles button

                                                  to depressed.

                   UNCHECK                        Clears checkbox, or toggles button

                                                  to popped-out.

                   HIGHLIGHT

                   UNHIGHLIGHT

                   LOCK                           Locks field's value (makes it read-only)

                   UNLOCK                         Unlocks field's value (makes it writeable)

            fields:

                   *                              All fields

                   - field_id [field_id...]       Negation specifier - MUST be first

                                                  in list (means: "all except following")

                   field_id [field_id...]         Listed by individual field ID

                                                  (e.g. MENU LOCK *  <- locks all fields,

                                                  MENU DISABLE - esc  <- would disable

                                                  everything but the item with the ID 'esc')

    MERGE section-list { TO | FROM } subroutine [ ! ]

                                                  Moves sections between main

                                                  design and a subroutine.

    MKDIR pathname                                Create new folder at pathname

    MOUSE [options ...]

            options:

                   ON

                   OFF

                   SPEED expression

    N           NC  NEST  NEW

    NC string options...                          Create Numeric Code text items

            options:

                   POSITION coordinate

                   XPOSITION x

                   YPOSITION y

                   FACE_NAME string               Font

                   TWIST expression

                   SLANT expression

                   WIDTH expression

                   HEIGHT expression

                   PEN n

                   JUSTIFICATION n

                   HANDLE n

                   ATTRIBUTE n

                   BIUM bium                      Bold, Italic, Underline,

                                                  Multi-Line Justification

                   COLOR rgbcolor

                   SPECIAL n                      No longer supported

                   DASH n                         No longer supported

                   CONSTRUCTION [NO]

                   ZPOSITION z

    NEST item-list1 OVER item-list2 [OFFSET expression]

                                                  Ignores items which are not straights/arcs/circles.

                                                  First item list will move vertically (same X)

                                                  until no line is closer than specified expression (default 0).

                                                  Distance is measured diagonally. To create a gap measured

                                                  vertically, nest with offset 0 and then move in Y.

                                                  To nest in X, temporarily rotate both lists 90 then nest in Y.

    NEW                                           Create new, empty document

                                                  (Old document is kept open, but

                                                  new document becomes current doc.)

    O           OUTPUT  OVERLAY

    OUTPUT                                        With no arguments, closes output file

    OUTPUT filename [command]

            commands:

                   APPEND                         Appends to existing file

                   FLUSH [AVOID coordinate [coordinate]] Flushes the output to file or screen

    AVOID causes message dialog to attempt to avoid the coordinate or rect specified

                   WRITE                          Write new file

                   OVERWRITE                      Overwrite existing file

                   PRINT                          Print arguments & close file

                   FILE {sub-list|group-list} [LIST]     Output subroutine info to file & close file

                                                  Compare FILE command.

                   LP                             List properties & close file

                   DIR                            Get directory & close file

                   MAP                            Output current map & close file

                   HIGHLIGHT n                    No longer supported

                   MESSAGE string                 No longer supported

    OVERLAY [3DFOLD SECTION section ATTRIBUTE n [NOT]] item-list1 WITH item-list2 [options...]

            item-list1 should define a closed curve (e.g. rectangle, ellipse, circle, polygon).

            options:

                   LENGTH expression              Deletes lines shorter than expression.

                   START { IN | OUT }             Speeds up calculations, if start is known

                   SELECT                         Selects lines instead of deleting them

                   REVERSE                        Keeps the lines outside list2,

                                                  instead of inside

                   TEST                           Sets #E = 0 if all items completely within contour.

                                                  Sets #E = 999 otherwise.

                   ADD

            Note:

                   TEST REVERSE                   Sets #E = 0 if all items completely outside contour.

                                                  Sets #E = 999 otherwise.

                   TEST SELECT                    No changes to #E, but selects lines completely or

                                                  partially within contour.

                   TEST SELECT REVERSE            No changes to #E, but selects lines completely or

                                                  partially outside contour.

    P           PARAM  PAUSE  PDIM  PLOT  POP  PRINT  PROMPT  PUSH

    PARAM DEFINE n                                Define parameter

                                                  Defines 4000..4000+n

    PARAM CLEAR list                              Remove changes made to the listed parameters.

    PARAM { READ | WRITE | UPDATE } filename [list]

                                                  Read/Write/Update listed parameters

                                                  to/from/in designated file.

            list:

                   { n | n..n } ...

    PAUSE seconds

    PDIM {command}                                Parametric Dimensions

            commands:

                   TEXT [value] string            value is a line number.

                                                  string contains Macro Language commands

                                                  (using PDIM parameters rather than normal

                                                  Macro Language variables).

                                                  Create a Text item in .PARAMETRIC section.

                   DIMENSION <dimension>          Uses DIMENS command syntax to create

                                                  dimension in .PARAMETRIC section

                   LAST                           Output current list to text

                   { ON | OFF }                   Turn Parametric mode on/off

                   { SUSPEND | RESUME }           Temporarily turn Parametric mode

                                                  on/off, without affecting

                                                  stack or .PARAMETRIC section.

                   RERUN                          Not supported

                   STORE string                   Add string to stack

                   POP                            Discard top value from stack

                   MODIFY { n | item } <dimension>

                                                  Modify a dimension, creating a

                                                  Text item to do the same on re-run.

                                                  n=0: Most recent dim

                                                  n>0: forward from first dim

                                            n<0: backward from latest dim

                   MODIFY 0 FROM x,y TO x,y STYLE n

                                                  Modifies most recent DIM, also

                                                  creating a TEXT item to do the

                                                  same on a re-run.

                   ORDINATE item-list             Offsets all ordinate dims in

                                                  .PARAMETRIC section

                   RECALC                         Recalculate value of all dependent

                                                  parametric variables

                   CHANGE item { VALUE | NAME | EXPRESSION } string

                                                  Change part of text string

                   NAME                           Add default name to all unnamed dims

                                                  except those of style 0

                   CLEAR                          Clear stack

                   STACK                          List current stack

                   LIST                           List text from pdim section

                   STYLE n                        Not supported

                   HIDE dimension                 Hide a dimension that is not

                                                  referenced in an expression

                   SELECT item                    If item is a Dimension, select all lines

                                                  which refer to it.

                                                  If item is not a Dim, select all Dims it

                                                  refers to.

                   SAVE filename                 Write parametric info as a macro for re-run

                   LOAD filename                  Load parametric info from a file (to fix)

                   ABORT                          Discard any Parametric Dimensions

                                                  created since last UNDO PDIM, and clear stack.

                   UNDO [OLD|NEW|CLEAR]           Not supported.  See UNDO PDIM.

            Special parameters:                   (To substitute for macro variables in pdim strings)

                   $1,$2,$3,…                     Text from first DIM in .PARAMETRIC, second, third, etc.

                   $PDP                           POP top string from stack (removing it)

                   $PDS or $PDS0                  Copy top string from stack (without disturbing order)

                   $PDS1,$PDS2,…                  Copy second string from stack, third, etc.

                   $PD or $PD0                    Converts to $n, where n is the latest DIM

                   $PD1,$PD2,…                    Converts to $n-m - i.e. last-but-m DIM

    PLOT [item-list] [options ...]

            For options, see DISPLAY, and also:

                   SPEED n

                   START s s                      Output a string before & after par(2002)

                   END s s                        Output a string before & after par(2003)

    POP                                           Restores most recent (un-popped)

                                                  thing saved by PUSH.

    PRINT [options] ...

            options:

                   expression

                   string

                   coordinate

                   item

                   COLOR n                        Not RGB

                   \\

    PROMPT [promptstring ...] [option variable ... [HISTORY id] [DEFAULT expression ... | SHOWDEFAULT expression ...]]

                                                  Controls the current prompt (Sets, clears, or waits for user input)

            promptstring:

                   expression

                   string

                   coordinate

                   item

                   ...                            NOTE: literally ...

                   COLOR rgbcolor

            option:

                   VALUE

                   ITEM

                   STRING

                   COORDS

            HISTORY id                            List recent values for this prompt (by ID)

                                                  id is usually the name of a macro.

            DEFAULT expression                    DEPRECATED

            SHOWDEFAULT expression                Use value of expression as default

                                                  (showing it in prompt dialog)

    PROMPT GET varname                            Gets the most recent prompt string into

                                                  the named string variable

    PUSH [options...]                             Saves given items to a push/pop stack,

                                                  which can be restored later (in reverse

                                                  of the order in which they were pushed)

                                                  using the POP command

            options:

                   SECTION

                   POSITION

                   DEFAULTS

                   ORIGIN

                   SETTINGS

                   MENUS

    Q           QUIT  QUOTE

    QUIT                                          Terminate application

    QUOTE [item-list] [BRIDGES]                   Display machining length,

                                                  index move length, and # of on/off dwells

    QUOTE [item-list] [BRIDGES] [VALUE cut move onoff]

                                                  Sets cut, move, and dwell variables

    R           READ  RECOVER  RECURSIVE  REDISPLAY  REMOVE RENUMBER

                RESTORE  RETURN  REVERSE  RF  RS

    READ filename [n1 n2]                         Copies to current output

    RECOVER macro-commands                        See TRY

    RECURSIVE ON | OFF                            ON returns line in a subroutine for

                                                  item(coordinate).

                                                  OFF returns the subroutine itself.

    REDISPLAY [item-list] [options ...]           Displays the selection, zoomed to fit,

                                                  with the chosen options (or current if none).

                                                  With options alone, uses previous selection and

                                                  just changes options.

            For options, see DISPLAY

            NOTE: You can use the following method to restore display options if you plan on

            changing several of them over the course of a macro:

                   DEFAULT DRAW VALUE &FLAGS      ; * Save old draw options

                   …                              ; * Do the things that change them

                   REDISPLAY FLAGS &FLAGS         ; * Restore them

    REMOVE filename                               Deletes file

                                                  NOTE: Does NOT send it to recycle bin.

    RENUMBER [item-list]                          Renumbers item list into

                                                  current section. If no list,

                                                  renumbers current section

    RESTORE [filename] [option]                   Restore named file into design window

            options:

                   STRING v

                   ORIGINAL                       Restore file as it was at beginning of session

                   REVERT                         Restore from autosaved copy

                   MERGE

    RETURN [n]                                    Return to calling macro from

                                                  current macro script.

                                                  n sets #E (default 0)

    REVERSE range

    REVERSE item

    RF oldname newname [COPY | NEW]               Rename subfile

    RS oldname newname                            Rename section

    S           SAVE  SCREEN  SECTDLG  SECTION  SELECT  SET  SHELL

                SIZE  SLEW  SMOOTHER  SNAPSHOT  SPLIT  STRETCH

                SUB  SUPERIMPOSE

    SAVE                                          Save changed current file by its

                                                  current name and path

    SAVE filename [options...]                    Save file of this name

            options:

                   OVERWRITE                      Overwrite existing file, if any

                   VERSION n                      Save as Cimex Version n

                   LAST                           Only save current selection

                   ORIGINAL                       Create original (session) copy

                                                  for reversion past in-session saves

                   EMAIL                          Save temp file for email

    SCREEN { SUPERIMPOSE | HIDE } item-list       Does not affect display, but

                                                  does affect which lines can

                                                  be found with ITEM(), LINK(), etc.

    SECTDLG                                       Dialog for selecting current section.

    SECTION { newsec | ! } [OVERWRITE|APPEND] [ { BEFORE | AFTER } oldsec ]

                                                  Define new section.

                   OVERWRITE                      If name of an existing section, overwrite it

                   APPEND                         If name of an existing section, add to it

                   BEFORE                         Position new section in section list before old section

                   AFTER                          Position new section in section list after old section

    SECTION { sec1 | !n } { BEFORE | AFTER } sec2 Move sec1 to position in section list

                                                  before or after sec2.

    SECTION { oldsec | !n } { HIDE | UNHIDE }     Make contents of section invisible.

    SECTION { oldsec | !n } { LOCK | UNLOCK }     Make contents of section non-editable.

    SELECT item-list                              Sets LAST to item-list

    SET {option} expression                       Set value

            options:

                   TRACKER {STYLE | SIZE}         For drawing tracking point

                   LEVEL n                        Current macro execution level.

                                                  You must re-set this appropriately

                                                  in the macro that changed it!

                   DEMO module                    module = Lite, Cad, Smoother,

                                                  Designer, Diemaker, Advanced, Rotary

                   DIRTY                          Edits have taken place

                                                  0 = no edits

    SHELL                                         Opens a command prompt

                                                  a.k.a. DOS prompt (in Windows, a DOS box).

    SHELL [SHOW | NOSHOW | MINIMIZE] [WAIT | NOWAIT] [TITLE 'title']

            { command | executable | document } [< input] [> output] [&> error] [arg0...argN]

                                                  Runs the given command shell command

                                                  or executable program.

                                                  Default behavior varies according to

                                                  the nature of the command being executed:

            command:

                   WAIT, MINIMIZE are the defaults.

            executable:

                   WIN32 executable: Then NOWAIT, SHOW become the defaults.

                   WIN16 executable: Then WAIT, MINIMIZE are the defaults.

                   DOS executable: Then WAIT, MINIMIZE are the defaults.

                   TRANSMIT: Then the defaults are SHOW, NOWAIT

            document:

                   None of the options have any effect.

                   This form of shell command allows Windows to open the

                   given document or folder by file type association.

                   This can be very useful for opening documents using

                   the user's preferred document reader, for example:

                   SHELL "$#Q\Trace.txt" can be used to open the trace

                   file using whatever txt reader the user prefers.

            SHOW | TEXT                           Executes the process in a

                                                  normal window that can be

                                                  seen by the user

            NOSHOW | MINIMIZE                     Executes the process

                                                  minimized to the task bar, so

                                                  that it is unobtrusive

            WAIT                                  Waits for the process to

                                                  complete before allowing the

                                                  macro to continue execution

                                                  WARNING: Currently, this

                                                  means that CimPACK/CAD is

                                                  completely locked up until

                                                  the process exits, no matter

                                                  how long that takes.

                                                  NOTE: This is generally

                                                  necessary if you wish to use

                                                  the output from some process

                                                  for the next step of

                                                  execution (for example, if

                                                  you use sort.exe to produce a

                                                  sorted file, then you must

                                                  wait for the sort.exe to

                                                  finish before you will have a

                                                  meaningful, sorted file to use)

            NOWAIT                                Spawns the process and allows

                                                  macro execution to continue unabated.

                                                  NOTE: This is generally preferred

                                                  if you're not specifically waiting

                                                  for some output from the process in

                                                  order to continue.

            TITLE                                 Sets title of the process's window.

                                                  (This will only affect a command or

                                                  DOS-executable process)

            SWAP | NOSWAP                         These keywords are supported

                                                  for backwards compatibility,

                                                  but they have no effect.

            < input                               Redirects standard input.

            > output                              Redirects standard output.

            &> error                              Redirects standard error.

            arg0..arg                             There can be zero or more

                                                  arguments to the command or executable

            *** Special Notes:

                   Due to backwards compatibility, it is possible to place

                   the entire command | executable | document plus all

                   arguments inside a single string, instead of as individual

                   macro command arguments:  e.g.

                           SHELL 'someprog.exe arg0 arg1 > output'

                   as opposed to

                           SHELL someprog.exe arg0 arg1 > output

                   This has the unfortunate side-effect of requiring nested

                   quotes only in the case where you need to quote a single

                   executable or document: e.g.

                           SHELL '"c:\program files\utils\bin\my executable.exe"'

                   works, but

                           SHELL 'c:\program files\utils\bin\my executable.exe'

                   fails.

    SIZE [item-list] [CONSTRUCTION [NO] [TEXT]] [VALUE var1 var2 var3 var4]

                                                  Display size of item list

    SLEW coordinate [options ...]                 Add a slew mark item at given coordinate

            options:

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   ZPOSITION expression

    SMOOTHER OPTIONS filename                     Set smoother options

            File may contain the following options:

                   TOLERANCE

                   XSCALE

                   YSCALE

                   MINIMUM value

                   MAXIMUM value

                   MAXGAP

                   MAXARC

                   INFORMAT

                   FORMAT formatname              CIMEX, DXF, DXFPOLY, HTD, HPVECTOR

                   SECTION

                   NUMBERS [YES|NO]

                   JOIN [YES|NO]

                   CHORD

                   INPUT

                   OUTPUT

                   QUIET

                   GO

                   EXISTING

                   DEBUG

                   COUNT

                   TIME

    SNAPSHOT format FILENAME filename [OVERWRITE] Save an image of the current design

                                                  View as a file of name filename.

                                                  This is the image only, without the

                                                  Cimex information.

            format:

                   BITMAP                         File will be saved as bitmap (.bmp).

            options:

                   OVERWRITE                      If a file of this name already exists,

                                                  overwrite it with the current image.

    SPLIT item-list [ { WITH | AND } item-list ]

    STRETCH [selection] [options...] [AND selection [scales...] ]...

                                                  NOTE: up to 3 AND selections

            selection:

                   item-list

                   START item

                   FINISH item

                   LIMITS coordinate [coordinate] All lines which start/end at coordinate

                   SCREEN coordinate [coordinate] As above, but only lines on screen

            options:

                   HANDLE coordinate

                   FROM coordinate

                   BY coordinate

                   TO coordinate

                   ZBY expression

                   ZTO expression

                   NOLINE                         No rubber-band line

                   OFFSET expression

            scales:

                   XSCALE expression              0 means no movement.

                   YSCALE expression

                   ORTHOGONAL angle

                   PARALLEL angle

    SUB filename [options ...]                    Insert file as subroutine.

            options:

                   POSITION coordinate | XPOSITION expression | YPOSITION expression

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   REVERSE                        Makes any included files external

                   CONSTRUCTION [NO]

                   ZPOSITION expression

    SUBROUTINE                                    No longer used -- see SUB

    SUPERIMPOSE item-list [options...]            Reverses HIDE

            For options, see DISPLAY

    T           TEMP  TEXT  TITLE  TOOL  TPC  TRANSFORM  TRIM  TRY

    TEMP { command }

            commands:

                   COPY [n]                       Copies LAST into TEMP

                   SELECT [n]                     Copies TEMP into LAST

                   SWAP                           Exchanges LAST into TEMP

                   CLEAR [n]                      Clears TEMP

                   ADD [RECURSIVE]                Adds LAST to TEMP

                   REMOVE [RECURSIVE]             Removes LAST from TEMP

            n                                      0 through 9

                                                  Indicates one of several

                                                  extra temp item lists.

    TEXT string options...                        Create Text item

            options:

                   POSITION coordinate

                   XPOSITION x

                   YPOSITION y

                   ZPOSITION z

                   FACE_NAME string               Font

                   TWIST expression

                   SLANT expression

                   WIDTH expression

                   HEIGHT expression

                   PEN n

                   JUSTIFICATION n                11..19 for bitmapped,

                                                  21..29 for fractions

                   HANDLE n

                   ATTRIBUTE n

                   COLOR rgbcolor

                   BIUM bium                      Bold, Italic, Underline,

                                                  Multi-Line Justification

                   SPECIAL n                      No longer supported

                   DASH n                         No longer supported

                   CONSTRUCTION [NO]

                   RPOSITION expression           No longer supported

    TITLE string                                  Sets title for current document.

    TOOL [ SELECT | GET ] options...

            options:

                   COORDINATE

                   LEVEL

                   PROMPT

                   HISTORY

                   KEY

                   NOTIFY

                   DIGITIZER

    TPC { EXPAND | CONTRACT | LEFT | RIGHT } item-list {ADJUST expression | TOOL n}

                                                  Apply Tool Path Compensation

    TPC DIRECTION item-list [VALUE variable]      NOTE: 1=ccw, -1=cw, or 0 if not closed

    TRANSFORM item-list [options ...]

            options:

                   FROM coordinate | XFROM expression | YFROM expression

                   TO coordinate | XTO expression | YTO expression

                   BY coordinate | XBY expression | YBY expression

                   TWIST expression

                   SCALE expression

                   { XSCALE | YSCALE } expression

                   NEGATE { X | Y }

                   TIMES n

                   ZFROM expression

                   { ZTO | ZBY } expression

                   NEGATE Z

                   ZSCALE expression

                   { XTWIST | YTWIST } expression

    TRIM coordinate [ITEM item]                   Deletes segment closest to cursor.

                                                  Same as T hotkey.

                                                  ITEM forces which line to trim.

                                                  Opposite of KEEP.

    TRY [MESSAGE | NOMESSAGE] { macro-commands } [ RECOVER { macro-commands } ] ... YRT

                                                  Exception handling.  If TRY commands fail,

                                                  RECOVER commands are executed, otherwise

                                                  RECOVER commands are skipped.

                                                  YRT ends the TRY/RECOVER sequence and

                                                  resumes normal execution.

    U           UNC  UNDO  UNGET  UNITS

    UNC { filename | - } [item-list] [options ...]       Create Universal NC file

            options:

                   SUBROUTINES

                   SECTIONS

                   ITEMS

                   TEXT

                   TPC

                   TOOLS

                   NOARCS

                   OVERWRITE

                   DIRECTION

                   DECIMALS n

                   ATTRIBUTES | MATTRIBUTES | SATTRIBUTES [n1 n2 n3 ...]

                   ONATTRIBUTES | OFFATTRIBUTES

                   ONPOINTAGES | OFFPOINTAGES

                   NORETURN | MNORETURN | SNORETURN

                   TOLERANCE expression

                   STEP expression

                   HOLE expression

                   MAXARC expression

                   MINARC expression

                   ANGLE angle

                   MOVE expression

                   POINTAGES | PWIDTHS [e1 e2 e3 ...]

                   BRIDGES

                   #BRIDGES

                   NIBBLES

                   ETCH n

                   LASERCK

                   SLOTCODE string

                   SLOTWIDTH expression

                   ROTATED

                   MIRRORED

    UNDO { command }

            commands:

                   CLEAR                          Discard all collected UNDO info

                   ABORT                          Discard most recent level UNDO info

                                                  (such as the UNDO COPY left hanging if we

                                                  don’t execute the corresponding UNDO NEW).

                   COPY item-list                 Records old items, about to be changed

                   MOVE item-list                 Like COPY, plus deletes listed items from design.

                   NONE                           Records old state: No old items being changed

                   NEW item-list                  Records new items created

                   UNDO                           Undoes the current level

                   REDO                           Restores what the most recent UNDO UNDO changed

                   PDIM                           Records parametric state

                   SEC section-list               No longer supported

                   NOW                            No longer supported

                   SET n item-list                No longer supported

                   RESET n item-list              No longer supported

    UNGET string

    UNGET n                                       ASCII code, or 901.. for

                                                  function keys, or -1.. for mouse buttons

    UNITS [ I | M ]                               Sets Imperial or Metric mode

    V           VARIABLE  VIEW

    VARIABLE { LOCAL | GLOBAL } &var1 &var2 ...

    VARIABLE { LOCAL | GLOBAL } COPY &var1* = &var2*

    VARIABLE UNDEFINE &variable[*] ...

    VIEW { MAXIMIZE | RESTORE }                   Maximize or restore the view

                                                  window for the document.

                                                  (Does not change application window.)

    W           WSCHECK

    WSCHECK                                       Deprecated

    X           XOR

    XOR { ON | OFF }                              Turns on or off XOR (Exclusive-Or) mode

                                                  for drawing to screen.

    Y           YRT

    YRT                                           See TRY

    Z           ZOOM

    ZOOM [x1,y1 x2,y2]                            Scale to fit design, or to fit given rectangle, on screen

## Macro Commands No Longer Supported

    BREAK { ON | OFF }

    BUS action [action ...]        NOTE: up to 4 actions in total

            action:

                   READ address BYTE [VAR var1 [var2 ...]]

                                                  NOTE: up to 20 vars

                   READ address STRING [UNTIL n] [VAR variable]

                                                  NOTE: n is ASCII, defaults to 13

                   WRITE address BYTE n1 [n2 ...]]

                                                  NOTE: up to 20 ASCII bytes

                   WRITE address STRING string

                   SENSE address [VAR variable]

                   WAIT condition [boolean condition ...] [VAR var1 var2]

                                                  NOTE: up to 4 conditions maximum

            address:

                   RAW a                          Integer port address

                   COM n                          1 to 4

                   U14 a                          U14 base address

            condition:

                   address [MASK m] = n

                   address [MASK m] <> n

            boolean:       & or |

    BUTTONS filename

    ECHO { MACRO | INPUT } { ON | OFF }

    FIX item-list

    FLOOD coordinate [options...]                 Flood fill

            options:

                   COLOR n

                   BORDER n

                   PATTERN n

    FTRANSFORM [sub-list] [options ...]           Transforms lines in subroutines

            options:

                   FROM coordinate | XFROM expression | YFROM expression

                   TO coordinate | XTO expression | YTO expression

                   BY coordinate | XBY expression | YBY expression

                   TWIST expression

                   SCALE expression

                   { XSCALE | YSCALE } expression

                   NEGATE { X | Y }

                   TIMES n

                   ZFROM expression

                   { ZTO | ZBY } expression

                   NEGATE Z

                   ZSCALE expression

                   RBY expression

                   RFROM expression RTO expression

                   { XTWIST | YTWIST } expression

    FUNCTIONS filename

    INPUT [filename [NOBELL]]                     NOBELL errors if bell sounds

    INPUT COM port [port] [baud]                  for linking 2 or more computers

    LR [NOHEADING] [item-list]

    MEMORY [VALUE ram1 ram2 ram3 disc1 disc2 disc3]

    NOW [ ON | OFF ]

    ORIGIN [options ...]

            option:

                   POSITION coordinate

                   TWIST expression

                   SCALE expression

                   NEGATE X | NEGATE Y

                   RPOSITION expression

    PAN {movement [expression]...} [item-list] [options ...]

            movements:

                   LEFT

                   RIGHT

                   UP

                   DOWN

            options:

                   position-option

                   draw-option [ n | NO]

            position-option:

                   SUPERIMPOSE

                   SECTIONS

                   ITEMS

                   SAVE

                   OLD                            Uses previous SAVE

            draw-option:

                   LINES | SUBROUTINES | SLEWS | DWELLS | HOLES

                   TPC | CONSTRUCTIONS | MOVES | CROSSES

                   NUMBERS | NAMES | ATTRIBUTES | COLOR | PASS

                   ALTERNATE | TEXT | REGIONS | ORIGIN

                   GRID | ROTATIONS | SELECT

                   NC | NORMAL | BACKGROUND | BRIDGES | EDGES

                   ARROWS | POINTAGES

    PEN [NOHEADING] [n]                           n is 1..30

    PEN TYPE n { COLOR rgbcolor | STYLE n } ...

    PEN n options...

            options:

                   COLOR rgbcolor

                   PATTERN n

                   SCALE n

    REPLOT [item-list] [options ...] [MORE]

            options:

                   position-option

                   draw-option [n | NO]

            position-option:

                   SCALE expression

                   SIZE expression

                   JUSTIFICATION n

                   POSITION coordinate

                   AT expression expression

                   CENTER

                   CORNER [n]

                   TOLERANCE expression

                   SUPERIMPOSE

                   SPEED n

                   FORCE n

                   MAP n                          n is 1..3

                   PDIM n [n n]

                   PAPER expression expression

                   START s s                      These output a string before

                                                  and after par(2002)

                   END s s                        These output a string before

                                                  and after par(2003)

            draw-option:

                   LINES | SUBROUTINES | SLEWS | DWELLS | HOLES

                   TPC | CONSTRUCTIONS | MOVES | CROSSES

                   NUMBERS | NAMES | ATTRIBUTES | COLOR | PASS

                   ALTERNATE | TEXT | REGIONS | ORIGIN

                   GRID | ROTATIONS | SELECT

                   NC | NORMAL | BACKGROUND | BRIDGES | EDGES

                   ARROWS | POINTAGES

    { RTO | RBY } expression [options ...]

            options:

                   RFROM expression

                   FROM coordinate | XFROM expression | YFROM expression

                   TO coordinate | XTO expression | YTO expression

                   BY coordinate | XBY expression | YBY expression

                   ATTRIBUTE n

                   SPECIAL n

                   DASH n

                   CONSTRUCTION [NO]

                   TOLERANCE expression

                   MOVE

                   REVERSE

                   ZFROM expression

                    { ZTO | ZBY } expression

    SINGLE { MACRO | INPUT } { n | ON | OFF }

    SMACRO [ON | OFF | filename]

    SSUB [filename]

    SURFACE [NOHEADING] sub-list

    SURFACE sub-list options...

            options:

                   START coordinate,z

                   ORIGIN coordinate

                   THICKNESS expression

                   ANGLE angle

                   INSIDE

                   OUTSIDE

                   GRID min max

                   COMPOUND | PLANE | CYLINDER rad | SPHERE rad | CONE ang

    TABLET [ON | OFF]

    TABLET type                                   type: KURTA | NUMONICS | MM |

                                                  BITPAD | ID | UIOF

    TABLET SCALE expression

    TABLET CORNER x y

    TABLET ZOOM { ON | OFF }

    TABLET SINGLE { ON | OFF }

    TABLET OUTPUT string

    TABLET MENU filename

    TERMINAL [options]

            options:

                   MENUS n1 n2 ... n24            24 different color options

                   COLOR n color

                   SCROLL

                   FULL

                   TEXT n

                   INPUT color

                   OUTPUT color

                   ERRORS color

                   PROMPTS color

                   CURSOR color

                   BACKGROUND color

                   HEADINGS color

                   STRETCH expression

                   MENUS                          Applies to menu mode. All the

                                                  others apply to command-line mode.

                                                  MENU colors are:

                                                  prompt:text,back,input

                                                  background:pattern,color

                                                  small menu:back,fill,text

                                                  menu:back,VGA border,thin border

                                                  mouse:off,on

                                                  text:key,hotkey,text

                                                  response,echo

                                                  track:fill,text

                                                  help:text,background

                                                  version:fill,text

    TUNE HOLETAIL radius                          radius is negative to move to

                                                  center of hole, positive to

                                                  move to start of lead-in cut.

    TUNE { DISPLAY | PLOT } option size

            option:

                   ORIGIN | SUBROUTINES | ROTATIONS | SLEWS |

                   DWELLS | CROSSES | NUMBERS | NAMES

    UNFIX item-list