Command Documentation

This is the Command documentation. Ascii Commands are used by the graphical Interface to do almost anything.

The same commands are used in the commandline version of Boolean to operate the program.
Also the commands can be used in the execdialog in the Graphical Version to Operate the program.

## Command Parser BNF

    <commands>         ::= [<blanks>] { { <command> }* }

    <command>          ::= [<blanks>] {<comment> | {<word> {<blanks> | <endcommand}}* }*

    <endcommand>       ::= {';' | '\n' | '\0' }

    <word>             ::= { <quotedstring> | <bracedstring> | <multipartword> }

    <quotedstring>     ::= ('"') {CHAR | '\"' | '\\n' | aliasref | envref }* ('"')

    <bracedstring>     ::= ('{') {CHAR | '\{' | '\}' | '\\n'}* ('}')

    <multipartword>    ::= { <aliasref> | <envref> | {CHAR | '\\n'}* }*

    <aliasref>         ::= ('%') { <name> <blank> | ('{') <name> ('}') }

    <envref>           ::= ('$') { <name> <blank> | ('{') <name> ('}') }

    <name>             ::= { LETTER | DIGIT | UNDERSCORE | MINUS }*

    <blanks>           ::= { TAB | SPACE | '\\n'}*

    <comment>          ::= # {CHAR}* ('\0')

    note:
    	[ ]	entity CAN occur zero or more times
    	( )	entity MUST occur
    	{ }	pick one of the entities within the braces
    	{ }*	entities within the braces CAN occur zero ore more times
    	{ }+	entities within the braces MUST occur one ore more times
             |      OR

# Help Top

help
Goal: | Show help screen
Syntax: | help [<command>]
Descr.: | This command shows help on the available commands. Help without a command shows a list of all valid commands. Help with a command shows help on that command.
Example: | help help (see this:) help (see all commands)

showkeybnf
Goal: | Show the Bachus Nauer Form of Key format
Syntax: | showkeybnf
Descr.: | This command shows the Bachus Nauer Form of the Key format.
Example: | showkeybnf

showprocessbnf
Goal: | Show Bachus Nauer Form of process files
Syntax: | showprocessbnf
Descr.: | This command shows the Bachus Nauer Form of the process file format.
Example: | showprocessbnf

showcommandbnf
Goal: | Show Bachus Nauer Form of commands
Syntax: | showcommandbnf
Descr.: | This command shows the Bachus Nauer Form of the command structure.
Example: | showcommandbnf

# Global variables Top

setalias
Goal: | Set alias
Syntax: | setalias aliasname string
Descr.: | Creates an internal alias "aliasname" with value "string"
Example: | setalias gdsuser %GDSROOT/gdsuser
Note: | String can contain reference to other aliases and environment variables.
See also: | %{} for referencing an alias showalias for displaying the alias list

setenv
Goal: | Set environment-variable
Syntax: | setenv env-name string
Descr.: | Creates an environment-variable "env-name" with value "string"
Example: | setenv HOME .
Note: | The environment, from which the program was started, is only modified during execution. String can contain reference to other aliases and environment variables.
See also: | ${} for usage of environment strings showenv for displaying environment-variable

%{} and %
Goal: | Use/Substitute alias
Syntax: | See Command BNF
Descr.: | Substitutes the internal alias "aliasname" with a string assigned earlier to this alias.
Example: | loadfile %{datadir}myfile.cal loadfile %{setupfile} loadfile %{GDSROOT}/%HOME/myfile.cal gds-ii %{COMMANDALIAS} arguments
Note: | An alias can contain an empty string, but the alias MUST exist.
See also: | showalias for displaying the alias list

${} and $
Goal: | Use/Substitute environment-variable
Syntax: | See Command BNF
Descr.: | Substitutes environment-variable "envname" with the stored string
Example: | loadfile ${datadir}myfile.cal gds-ii loadfile $GDSROOT/${HOME}/myfile.cal gds-ii ${DOLLARVARIABLE} argument
Note: | An environment variable can contain an empty string, but the variable MUST exist.
See also: | showenv for displaying an environment-variable

showalias
Goal: | Show alias
Syntax: | showalias [<alias>]
Descr.: | The showalias command, without an alias(name), shows all defined aliases. The showalias command with a name shows that alias.
Example: | showalias datadir
See also: | setalias and %{} for defining and substituting aliases

showenv
Goal: | Show environment variable (use capital letters for name)
Syntax: | showenv <environment_variable>
Descr.: | The showenv command shows the contents of the <environment_variable> variable.
Example: | showenv HOME
Note: | Environment variables MUST be typed in CAPTAL letters.
See also: | setenv and ${} for defining and substituting environment variables.

# Input Dialogs Top

askfile
Goal: | Ask for a filename
Syntax: | askfile "<TITLE> <DIALOG-TYPE> <FILE-MASKS> <DEF-DIR> <DEF-EXT> <FILE-ALIAS>" Title Title of dialog box Dialog-type Type of dialog box (OPEN or SAVE) File-masks Mask for file listbox (All|*.*|Key-files|*.key) Def-dir Directory to start in Def-ext File-extention to show File-alias alias to put filename in
Descr.: | Shows a dialog, with drive, directory and file boxes, to select or enter a file. For the selected file an alias is created (<File-alias>) containing the file name. This mechanism is used to be able to load or save the file from a process file by using the alias.
Example: | askfile "Open GDS-II file OPEN GDS-II|*.gds;*.cal|All|*.*| C:\DATA\ CAL gdsfile" (followed by, for example, 'loadfile %{selectedfile}')
Notes: | Double-quotes are optional, use them when your string contains special characters, such as ';' (end of command) All of the contents of the dialog apply to the window version, the commandline version only shows the title and directory.

ask
Goal: | Ask
Syntax: | ask "<TITLE> <ALIAS>" Title Title of the input dialog Alias alias to put the input into
Descr.: | Asks for input
Example: | ask "Please give me some input,inputdata"

# Load / Save Commands Top

showfilename
Goal: | Show filename
Syntax: | showfilename
Descr.: | Show the name of the file in memory.
Example: | showfilename

savevisible
Goal: | Only save visible structures
Syntax: | savevisible <0>|<1>
Descr.: | When savevisible 1, only the layers visibile on screen are saved when using the savefile command.
Example: | savevisible 0
Note: | When writing to a file, the current file remains in memory, to prevent data-loss.

loadfile
Goal: | Load a file
Syntax: | loadfile <FILENAME> <FILETYPE> Filename Path + name of the file Filetype Type of file (gds-ii, key or flash)
Descr.: | Loads a file
Example: | loadfile %{datadir}one.lay key loadfile /home/klaas/gdsuser/data/combiner.gds gds-ii
Note: | File type must be specified at all times. The extension can be anything at all.

savefile
Goal: | Save a file
Syntax: | savefile <FILENAME> <FILETYPE> Filename Path + name of the file Filetype Filetype Type of file (gds-ii, key or flash)
Descr.: | Saves a file
Example: | savefile %{datadir}one.lay key savefile /home/klaas/gdsuser/data/combiner.gds gds-ii
Note: | File type must be specified at all times. The extension can be anything at all.

mergefile
Goal: | Merge a file
Syntax: | mergefile <FILENAME> <FILETYPE> Filename Path + name of the file Filetype Type of file (gds-ii, key or flash)
Descr.: | Loads a file and merges it with the one in memory
Example: | mergefile %{datadir}one.lay key mergefile /home/klaas/gdsuser/data/combiner.gds gds-ii
Note: | File type must be specified at all times. The extension can be anything at all. This operation is only available when a file is in memory.

closefile
Goal: | Close file
Syntax: | closefile
Descr.: | Close the current (data)file

loadsetup
Goal: | Load setupfile
Syntax: | loadsetup <file>
Descr.: | Load a setup or configuration file
Example: | loadsetup %{setupfile}
Note: | This function parses a setupfile like a processfile, but other aliases are set

savesetup
Goal: | Save setupfile
Syntax: | savesetup <file>
Descr.: | Save a setup or configuration file
Example: | loadsetup %{setupdir}mysetup.set

loadprocess
Goal: | Load processing file
Syntax: | loadprocess <file>
Descr.: | Execute a processing file. This is a file containing pre-recorded commands and can be used as a macro.
Example: | loadprocess %{procdir}automatic.prs
Note: | Settings may/can be changed during execution.
See also: | record for creating process files

record
Goal: | Start/Stop recording a processing file
Syntax: | record <filename> (start) record (stop)
Descr.: | Start/Stop process recording. This function is used to record a macro file. While recording all (executed) actions are recorded to the file. When executing a process file, the record command will be ignored.
Example: | record %{procdir}nothing.prs record
Note: | This function rudely overwrites an existing file (if it can).
See also: | loadprocess for executing process files

# Reading Key strings Top

keystring
Goal: | Enables drawing with processfile
Syntax: | keystring '{' (<key-file elements>)* '}'
Descr.: | For info, see the Bachus Nauer Forms for the Key format.
Example: |
    keystring {CIRCLE; LAYER 0;  WIDTH 0;  XY 1;\
       X 620.714; Y  188.116;   RADIUS 156.3;\
    ENDEL;\
    BOX; LAYER 0;  BOXTYPE 0;  WIDTH 0;  XY 5;\
       X 0;       Y 0;	X 500;	 Y 0;\
       X 500;     Y 500;	X 0;     Y 500;\
       X 0;       Y 0;  \
    ENDEL;\
    TEXT; LAYER 0; \
    TEXTTYPE 0; PRESENTATION 0,2,1; STRANS 0,0,0; MAG 400; \
       XY 1; \
       X   1030000.000; Y  329000.000; \
    STRING "here some text"; \
    ENDEL;\
    PATH; LAYER 0; DATATYPE 0; WIDTH 100000; \
       XY 4; \
       X  57000.000; Y  70000.000;   X  160000.000; Y  70000.000;   \
       X 257000.000; Y 270000.000;   X 2160000.000; Y 270000.000;   \
    ENDEL;\
    BOUNDARY; LAYER 0;  DATATYPE 0; WIDTH 25000; \
       XY 7; \
       X   500000;  Y     89170;   X  500000; Y    0000;   \
       X     0000;  Y      0000;   X    0000; Y  500000;   \
       X   500000;  Y    500000;   X  500000; Y  287060;   \
       XM  773100;  YM   222900;   XO 620834; YO 188115;   \
       X   500000;  Y     89170; \
    ENDEL;}

    # Elements can be placed together in one key string like above,
    # or seperate like below. Comment lines can also be added
    # (like this ;-)

    keystring {ARC; LAYER 0;  DATATYPE 0; WIDTH 100000;\
       XY 2; \
       X  1500000;  Y   287060; \
       XM 1773100;  YM  222900;  XO  1620834; YO 188115;   \
       X  1500000;  Y    89170; \
    ENDEL;}
Note: | Only the elements from Key files can be used inside a key string. The key elements are seperated by a semi-colon or a backslash character to continue on the next line.
See also: | defaultunit for specifying the default unit. defaultaccur for specifying the default accuracy. Key Bachus Nauer.

defaultaccur
Goal: | Sets the default accuracy
Syntax: | defaultaccur <number>
Descr.: | Sets the default accuracy. This is used when a process file with key strings is read. When a file is in memory, the accuracy from that file is used. If not, the accuracy 'defaultaccur' will be used. Using a value of 0.01 means that two figures behind the comma will be displayed.
Example: | defaultaccur 0.01
Note: | This value is only used when there's no file in memory.
See also: | defaultunit for specifying the default unit. keystring for drawing with a process file.

defaultunit
Goal: | Sets the default unit
Syntax: | defaultunit <unit> <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | Sets the default unit. This is used when a process file with key strings is read. The numbers in the file will be interpreted with 'defaultunit' as multiplier instead of meters (=1).
Example: | defaultunit um
See also: | defaultaccur for specifying the default accuracy. keystring for drawing with a process file.

# Setting Operation Parameters Top

selected
Goal: | Set Selected only flag
Syntax: | selected <0>|<1>
Descr.: | When selected 1, the operations which don't need groups are performed only on selected structures.
Example: | selected 1
See also: | delete, flatten, validate and transform.

showfactors
Goal: | Show factor settings
Syntax: | showfactors
Descr.: | Shows the current factor settings
Example: | showfactors
See also: | Factors: selectmarge, snapfactor, correctionfactor, roundfactor, correctionaber, roundtype, toarcrmin, toarcrmax, arcaccur, polyaccur, smoothaccur, maxlinemerge, displayaber, displayaber, displayaber

selectmarge
Goal: | Set selectmarge
Syntax: | selectmarge <number>
Descr.: | The purpose of 'selectmarge' is that a user doesn't have to click exactly on a polygon to select it. 'Selectmarge' defines the percentage of the screenwidth a user can click next to a polygon and still select it.
Example: | selectmarge 0.01

snapfactor
Goal: | Set snapfactor
Syntax: | snapfactor <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | At the beginning of a logical operation (i.e. AND, OR...) polygon segments shorter than 'snapfactor' are removed. Polygons that are closer to eachother than 'snapfactor' are connected to eachother.
Example: | snapfactor {1.0 um} snapfactor 1.0um

correctionfactor
Goal: | Set correctionfactor
Syntax: | correctionfactor <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the correction and makering functions, which create a ring around the polygons. For correction, this factor determines the width by which the polygon is enlarged or shrinked. A positive correctionfactor enlarges the polygon and a negative shrinks it. For makering, this factor determines half the width (radius) of the ring. The boundaries of the ring are this size smaller and larger than the original polygon.
Example: | correctionfactor {5.5 um} correctionfactor 5.5um

correctionaber
Goal: | Set correctionaber
Syntax: | correctionaber <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used when creating a ring around the boundaries of a polygon. It determines the accuracy of the segments of the ring.
Example: | correctionaber {1.0 um} correctionaber 1.0um

roundfactor
Goal: | Set roundfactor
Syntax: | roundfactor <number>
Descr.: | This variable is used when rounding sharp corners. An arc is calculated at the sharp edge of a polygon. If the distance of the sharp edge to the midpoint of arc is longer than arc- radius * roundfactor, then the edge is replaced by the arc.
Example: | roundfactor 1.5

roundtype
Goal: | Set roundtype
Syntax: | roundtype <circle>|<medial>
Descr.: | This variable specifies the rounding type when creating a ring around a sharp edge. The rounding type is used when the distance of the new edge to the original is longer than 'roundfactor' * 'correctionfactor'. The circles must fit inside the enlarged/shrinked polygon. The Circle type creates a circle with the old edge as midpoint and 'correctionfactor' as radius. The Medial type creates a circle on the line between the old and new edge. The far most crossing of this circle with this help-line is laying at a distance of 'roundfactor' * 'correctionfactor' from the old edge.
Example: | roundtype circle
Note: | ! This is NOT implemented yet ! Only Circle type is used !

toarcrmin
Goal: | Set toarcrmin
Syntax: | toarcrmin <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the polygon to arc conversion function, and specifies the minimum radius of an arc.
Example: | toarcrmin {50 um} toarcrmin 50um

toarcrmax
Goal: | Set toarcrmax
Syntax: | toarcrmax <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the polygon to arc conversion function, and specifies the maximum radius of an arc.
Example: | toarcrmax {10 cm} toarcrmax 10cm

arcaccur
Goal: | Set arcaccur
Syntax: | arcaccur <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the polygon to arc conversion function, and specifies the maximum abberation of an arc to the original line-pieces.
Example: | arcaccur {25 um} arcaccur 25um

polyaccur
Goal: | Set polyaccur
Syntax: | polyaccur <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the arc/circle to polygon conversion function, and specifies the maximum abberation of a polygon to the original arc/circle.
Example: | polyaccur {1 um} polyaccur 1um

smoothaccur
Goal: | Set smoothaccur
Syntax: | smoothaccur <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the smoothen function, and specifies the maximum abberation the new polygon may have to the original.
Example: | smoothaccur {5 um} smoothaccur 5um

maxlinemerge
Goal: | Set maxlinemerge
Syntax: | maxlinemerge <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the smoothen function, and specifies the maximum length of a line-pieces where other lines may be merged to.
Example: | maxlinemerge {5000 um} maxlinemerge 5000um

displayaber
Goal: | Set displayaber
Syntax: | displayaber <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | This variable is used by the screendriver, and specifies the accuracy of displayed arcs and circles. Internally they are converted to line-pieces. This variable is the display version of 'polyaccur', which is the operation version. Too see the effect of a change in value, redraw the screen.
Example: | displayaber {5 um} displayaber 5um

structhres
Goal: | Set structure drawing threshold
Syntax: | structhres <number> <number> integer number specifying pixels
Descr.: | This variable is used by the screendriver, and specifies when a structure will be drawn. If the structure boundingbox on the screen is less then the given number of pixels on the screen, only the boundingbox will be drawn. For huge drawings this will increase the drawing speed.
Example: | structhres 100

primthres
Goal: | Set primitive drawing threshold
Syntax: | primthres <number <true | false> <number> integer number specifying pixels
Descr.: | This variable is used by the screendriver, and specifies when a primitive will be drawn. If the primitive boundingbox on the screen is less then the given number of pixels on the screen, only the boundingbox will be drawn if the second parameter is True. If the second parameter is False nothing will be drawn. For huge drawings this will increase the drawing speed.
Example: | primthres 5

# Setting Transformation Parameters Top

mirrorx
Goal: | Set mirror in X-axis on/off
Syntax: | mirrorx <0>|<1>
Descr.: | Mirrorx sets the option for the transform and transform_a operations to mirror structures in the X-axis.
Example: | mirrorx 0
Note: | If the polygons are visible but not filled, check the fill- color and pattern. This only applies to the window version.

mirrory
Goal: | Set mirror in Y-axis on/off
Syntax: | mirrory <0>|<1>
Descr.: | Mirrory sets the option for the transform and transform_a operations to mirror structures in the Y-axis.
Example: | mirrory 1
Note: | If the polygons are visible but not filled, check the fill- color and pattern. This only applies to the window version.

movehor
Goal: | Set movehor amount
Syntax: | movehor <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | Specifies the distance structures are moved horizontal when the transform or transform_a operation is performed.
Example: | movehor {15 um} movehor 15um
See also: | displayaber

movever
Goal: | Set movever amount
Syntax: | movever <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | Specifies the distance structures are moved vertical when the transform or transform_a operation is performed.
Example: | movever {0.3 mm} movever 0.3mm
See also: | displayaber

scale
Goal: | Set scale factor
Syntax: | scale <number>
Descr.: | Specifies the scale factor for the transform and transform_a operations.
Example: | scale 2.0
See also: | displayaber

rotate
Goal: | Set rotate amount
Syntax: | rotate <number>
Descr.: | Specifies the rotation in degrees for the transform and transform_a operations.
Example: | rotate 45
See also: | direction

direction
Goal: | Set rotate direction
Syntax: | direction <Clockwise>|<Counter clockwise>
Descr.: | Specifies the direction of the rotation for the transform and transform_a operations.
Example: | direction Clockwise direction {Counter clockwise}
See also: | rotate

# Defining Operation Groups Top

showgroups
Goal: | Show group settings (A, B and Destination)
Syntax: | showgroups
Descr.: | Shows the layers in group A, B and destination. Groups A and B contains a list of layernumbers, destination contains only one layer.
Example: | showgroups
See also: | group_a, group_b and destination for setting the layer groups

group_a
Goal: | Set group A
Syntax: | to set group_a to (selected) elements on given layers: group_a <layer_no> <layer_no> <layer_no> {True|False} <layer_no> layer number (0-99) to make group_a empty: group_a empty to set group_a to the selected elements: group_a selected
Descr.: | Fill/clear layer-group A
Example: | group_a 0 3 14 true group_a empty group_a selected

group_b
Goal: | Set group B
Syntax: | to set group_b to (selected) elements on given layers: group_a <layer_no> <layer_no> <layer_no> {True|False} <layer_no> layer number (0-99) to make group_b empty: group_b empty to set group_b to the selected elements: group_b selected
Descr.: | Fill/clear layer-group B
Example: | group_b 0 3 14 false group_b empty group_b selected

destination
Goal: | Set destination
Syntax: | destination <layer_no> <layer_no> layer number (0-99) or empty for none
Descr.: | Fill/clear destination
Example: | destination 3 destination empty

# Operations Top

flatten
Goal: | Flatten graphical structures
Syntax: | flatten
Descr.: | The datafile can consist of several structures and structure-references. Flatten expands all references in the visible structure to one (top)structure by copying the elements inside referenced structures to that level. Empty structures will be removed.
Example: | flatten
Parameters: | None.
Note: | File may grow very large (in memory too)

delete
Goal: | Delete selected elements
Syntax: | delete
Descr.: | Deletes in Visible structure contents, elements that are selected.
Example: | delete
Groups: | A will be modified during this action, B and Destination are ignored.
Parameters: | None.
Note: | Only the elements inside the visible top structure are deleted. Selected References are also deleted, by first exploding them to make them unique. This may lead to empty structures.

delete_a
Goal: | Delete layer
Syntax: | delete_a
Descr.: | Deletes in visible structure contents, elements specified in group A. Group A is specified with the group_a command. In case the onlyselected flag is set for group A, selected References are first exploded. The command only deletes elements,this may result in empty structures
Example: | delete_a
Groups: | A must be set. B and destination are ignored.
Parameters: | None.
Note: | Only the elements inside the visible structure are deleted, references to other structures will be exploded first if onlyselected in the group is True.

transform
Goal: | Transform structures
Syntax: | transform
Descr.: | Transforms structure contents visible on screen. Uses the transformation settings.
Example: | transform
Groups: | None.
Parameters: | None.
Note: | Transformation can be undone with undotrans. Selected flag can be set to transform only the selected elements (also structure references)
See also: | transform_a for transforming structures in group A, mirrorx, mirrory, movehor, movever, scale, rotate and direction for transformation settings.

undotrans
Goal: | Undo transformation
Syntax: | undotrans
Descr.: | Transforms structure back to old situation (before transform).
Example: | undotrans
Groups: | None.
Parameters: | None.
Note: | Transformation can only be undone immediately after the transformation itself. When first an other command is chosen, 'undotrans' becomes unavailable.
See also: | transform for transforming structures and undotrans_a for undoing transformation on group A.

transform_a
Goal: | Transform structures in group A
Syntax: | transform_a
Descr.: | Transforms in visible structure contents elements specified in group A. Uses the transformation settings.
Example: | transform_a
Groups: | A must be set. B and destination are ignored
Parameters: | None.
Note: | Transformation can be undone with undotrans_a.
See also: | transform for transforming structures not in group A, mirrorx, mirrory, movehor, movever, scale, rotate and direction for transformation settings.

undotrans_a
Goal: | Undo transformation on group A
Syntax: | undotrans_a
Descr.: | Transforms structure back to old situation (before transform_a).
Example: | undotrans_a
Groups: | A must be set. B and destination are ignored.
Parameters: | None.
Note: | Transformation can only be undone immediately after the transformation itself. When first an other command is choosen, 'undotrans_a' becomes unavailable.
See also: | transform_a for transforming structures and undotrans for undoing transformation not on group A.

makering
Goal: | Create ring
Syntax: | makering
Descr.: | Creates a ring around the boundaries of the polygons on elements defined in group A.
Example: | makering
Groups: | A and Desination set. B is ignored.
Parameters: | 'correctionfactor' is the radius of the ring. 'correctionaber' is the accuracy of the segments of the ring.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

correction
Goal: | Create ring
Syntax: | correction
Descr.: | Creates a ring around the boundaries of the polygons on elements defined in group A and merges it with the original polygons. With a positive/negetive correction value you can enlarge/shrink the drawing with that value.
Example: | correction
Groups: | A and Desination set. B is ignored.
Parameters: | 'correctionfactor' is the radius of the ring.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

copy
Goal: | Copy elements/layer(s)
Syntax: | copy
Descr.: | Duplicates elements from group A to the layer in destination.
Example: | copy
Parameters: | None.
Groups: | A and Desination set. B is ignored.

move
Goal: | Move elements/layers
Syntax: | move
Descr.: | Changes the layer-numbers of the elements in group A to the layer in destination.
Example: | move
Groups: | A and Desination set. B is ignored.

toarcs
Goal: | Convert polygons to arcs
Syntax: | toarcs
Descr.: | Detects arcs in polygons and replaces those segments.
Example: | toarcs
Groups: | A and Desination set. B is ignored.
Parameters: | 'toarcrmax' and 'toarcrmin' as range for the radius. 'arcaccur' for maximum abberation between the arc and the polygon segments.
See also: | tolines and polyaccur for conversion of Arcs and Circles.

tolines
Goal: | Convert arcs and circles to polygons
Syntax: | tolines
Descr.: | Replaces arcs and circles, in a polygon, with line-pieces.
Example: | tolines
Groups: | A and Desination set. B is ignored.
Parameters: | 'polyaccur' determines the maximum abberation that between the polygon segments and the arc/circle.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | toarcs and arcaccur for conversion of lines to Arcs and Circles.

smoothen
Goal: | Smoothen the structure
Syntax: | smoothen
Descr.: | Removes glitches and short lines from polygons.
Example: | smoothen
Groups: | A and Desination set. B is ignored.
Parameters: | 'smoothaccur' for maximum abberation of the smoothed polygon-segments to the originals. 'maxlinemerge' for maximum line-length to merge lines to.
Note: | All elements that have a surface are converted to polygons. Polylines and polygons containing arcsegments are also converted. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

intersect
Goal: | Calculate intersections (Logical AND: A AND B)
Syntax: | intersect
Descr.: | Calculate the intersections (overlappings) between the elements in group A and B.
Example: | intersect
Groups: | A or B and destination must be set.
Parameters: | 'snapfactor' determines the accuracy with which the calculations are performed, and 'polyaccur' for conversion of Arcs and Circles.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

merge
Goal: | Merges elements (Logical OR: A OR B)
Syntax: | merge
Descr.: | Merges the elements in group A and B (Logical OR of A and B)
Example: | merge
Groups: | A or B and destination must be set.
Parameters: | 'snapfactor' determines the accuracy with which the calculations are performed, and 'polyaccur' for conversion of Arcs and Circles.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

a_subtract_b
Goal: | Subtraction (A - B)
Syntax: | a_subtract_b
Descr.: | Subtracts the contents of group B from those of group A (A-B).
Example: | a_subtract_b
Groups: | A or B and destination must be set.
Parameters: | 'snapfactor' determines the accuracy with which the calculations are performed, and 'polyaccur' for conversion of Arcs and Circles.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

b_subtract_a
Goal: | Subtraction (B - A)
Syntax: | b_subtract_a
Descr.: | Subtracts the contents of group A from those of group B (B-A).
Example: | b_subtract_a
Groups: | A or B and destination must be set.
Parameters: | 'snapfactor' determines the accuracy with which the calculations are performed, and 'polyaccur' for conversion of Arcs and Circles.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

exor
Goal: | Exor (Logical EXOR: A EXOR B)
Syntax: | exor
Descr.: | Performs an exclusive-or operation between the contents of group A and B. This results in the differences between group A and B (i.e. overlappings are not copied).
Example: | exor
Groups: | A or B and destination must be set.
Parameters: | 'snapfactor' determines the accuracy with which the calculations are performed, and 'polyaccur' for conversion of Arcs and Circles.
Note: | All elements that have a surface are converted to polygons. (Text does not have a surface and is not converted.)
See also: | tolines and polyaccur for conversion of Arcs and Circles.

# Changing Layer Settings Top

showlayers
Goal: | Show available layers
Syntax: | showlayers
Descr.: | Show the layers that are available in the current drawing.
Example: | showlayers

setlayer
Goal: | Set current layer
Syntax: | setlayer <layer_nr> <layer_nr> is in [0..99]
Descr.: | Select a layer. This is needed before changing layersettings.
Example: | setlayer 0

name
Goal: | Set layer name
Syntax: | name <name> | "<name>"
Descr.: | Set the name of the selected layer.
Example: | name "Wow, this is the most beautiful layer I have ever seen!"
Note: | First select a layer, with 'setlayer'.

visible
Goal: | Set Layer Visibility On/Off
Syntax: | visible 1 | 0 [all]
Descr.: | Select if the selected layer/all layers is/are visible or not.
Example: | visible 1 visible 1 all
Note: | First select a layer, with 'setlayer'.

selectable
Goal: | Set Layer Selectability On/Off
Syntax: | selectable 1 | 0 [all]
Descr.: | Select if the current layer/all layers is/are selectable or not.
Example: | selectable 1 selectable 0 all
Note: | First select a layer, with 'setlayer'.

bordercolor
Goal: | Set layer border color
Syntax: | bordercolor <r> <g> <b> <r> <g> and <b> are in [0..255]
Descr.: | Defines the border color of the selected layer. This determines color of the borders around polygons and the color of text.
Example: | bordercolor 0 0 0
Note: | First select a layer, with 'setlayer'.

fillcolor
Goal: | Set layer fill color
Syntax: | fillcolor <r> <g> <b> <r> <g> and <b> are in [0..255]
Descr.: | Defines the fill color of the selected layer. This determines the color with which polygons are filled.
Example: | fillcolor 180 0 200
Note: | First select a layer, with 'setlayer'.

brush
Goal: | Set layer brush
Syntax: | brush <brush_nr> <brush_nr> is in [0..15]
Descr.: | Selects the fill pattern of the selected layer. This determines how polygons are filled on the screen.
Example: | brush 4
Note: | First select a layer, with 'setlayer'.

order
Goal: | Set layer order
Syntax: | order <order_nr> <order_nr> is in [0..99]
Descr.: | Selects the order in which the layers are drawn on the screen. Lower numbers are more at the foreground than higher ones, so 0 is drawn on top of 1 and 99.
Example: | order 0
Note: | First select a layer, with 'setlayer'.

# Structure Commands Top

viewstructure
Goal: | Set View Structure
Syntax: | Viewstructure <structure_name>
Descr.: | Select a structure to make visible on the screen. All operations work on the visible structure.
Example: | viewstructure
Note: | A file must be in memory. This only applies to the window version.

# Display Options Top

drawoutline
Goal: | Set fill polygons on/off
Syntax: | drawoutline <0>|<1>
Descr.: | Drawoutline sets the option to Draw-only the outlines of the drawing, i.e. not to fill the polygons.
Example: | drawoutline 0
Note: | If the polygons are visible but not filled, check the fill- color and pattern. This only applies to the window version.

showcoords
Goal: | Set show coordinates on/off
Syntax: | showcoords <0>|<1>
Descr.: | Select if the mouse coordinates are shown in the statusbar.
Example: | showcoords 1
Note: | This only applies to the window version.

showgrid
Goal: | Show grid on screen
Syntax: | showgrid <0>|<1>
Descr.: | Shows the grid on the screen using the gridsettings.
Example: | showgrid 1
Note: | A file must be in memory. This only applies to the window version.
See also: | gridspace, gridcolour and gridplacement for specifying gridsettings.

gridspace
Goal: | Specify distance between grid points
Syntax: | gridspace <number> [<unit>] <unit> in: pm, nm, um, mm, cm, dm, m, e, inch, ft
Descr.: | Specifies the distance between points, drawn as single pixels, horizontal and vertical.
Example: | gridspace 5 mm
Note: | When showgrid is on, call draw to draw grid with the new settings.
See also: | gridcolour and gridplacement for specifying gridsettings.

gridcolour
Goal: | Specify the colour of grid points
Syntax: | gridcolour <r> <g> <b> <r> <g> and <b> are in [0..255]
Descr.: | Specifies the colour of gridpoints on the screen on white background.
Example: | gridcolour 0 255 125
Note: | When showgrid is on, call draw to draw grid with the new settings. The gridcolour is drawn with the XOR function, which makes the grid visible on any background.
See also: | gridspace and gridplacement for specifying gridsettings.

gridplacement
Goal: | Specify the place of the grid
Syntax: | gridplacement <0>|<1>
Descr.: | Specifies the place of the grid. When this value is 0, the grid is drawn on the background. When 1, the grid is drawn on the foreground.
Example: | gridplacement 1
Note: | When showgrid is on, call draw to draw grid with the new settings.
See also: | gridspace and gridcolour for specifying gridsettings.

# Display Commands Top

zoom
Goal: | Zoom
Syntax: | zoom <x_min> <y_min> <x_max> <y_max>
Descr.: | Zoom to the selected window coordinates.
Example: | zoom -1000 -1000 1000 1000
Note: | A file must be in memory. This only applies to the window version.
See also: | zoomback and zoomout.

zoomback
Goal: | Zoom back
Syntax: | zoomback
Descr.: | Select the previous zooming coordinates from the zoom history.
Example: | zoomback
Note: | A file must be in memory. This only applies to the window version.
See also: | zoom and zoomout.

zoomout
Goal: | Zoom out
Syntax: | zoomout
Descr.: | Select the first zooming coordinates from the zoom history, this selects full view of the current structure.
Example: | zoomout
Note: | A file must be in memory. This only applies to the window version.
See also: | zoom and zoomback

select
Goal: | Selects elements
Syntax: | To (de)select an area: select <x_min> <y_min> <x_max><y_max><mode> To (de)select at a point: select <x> <y> <mode> To (de)select all: select all <mode> <mode> = true : select mode <mode> = false: de-select mode
Descr.: | Selects elements (also references) in specified area or at given point. With point selection the elements are selected inside out (smallest first). In deselection mode this is the same.
Example: | select 0 0 1000 2000 true select 1000 2000 false select all false
Note: | A file must be in memory. Also works in commandline mode.
See also: | selectmarge

clearscreen
Goal: | Clear Screen
Syntax: | clearscreen <rgb> <rgb> is the color value
Descr.: | Clearscreen fills the screen with color <rgb>.
Example: | clearscreen 16777215 (RRGGBB: 0xFFFFFF) (white) clearscreen 0 (RRGGBB: 0x000000) (black)
Note: | This only applies to the window version. The color must be entered decimal and not hexadecimal, unfortunately.

draw
Goal: | Redraw Screen
Syntax: | draw
Descr.: | Clear the screen and then redraws the drawing.
Example: | draw
Note: | A file must be in memory. This only applies to the window version.

print
Goal: | Print Screen
Syntax: | print
Descr.: | Print what's on the screen.
Example: | print
Note: | A file must be in memory. This only applies to the window version.

startpoint
Goal: | Set startpoint
Syntax: | startpoint <x> <y>
Descr.: | Sets the relative startpoint to the selected coordinates. Used for calculating distance with relative points.
Example: | startpoint -1000 -1500
Note: | A file must be in memory. This only applies to the window version. When a new file is loaded, startpoint is set at (0,0)
See also: | relativepoint

relativepoint
Goal: | Set relativepoint
Syntax: | relativepoint <x> <y>
Descr.: | Sets the relative endpoint to the selected coordinates. Used for calculating distance with start point.
Example: | relativepoint 1200 -1500
Note: | A file must be in memory. This only applies to the window version. When a relative point is defined, the 'distance' dialog appears (if it's not on the screen already). The properties calculated are: dx, dy, distance between start and endpoints and the angle of the line between the points.
See also: | startpoint

# File History Top

addfile
Goal: | Add file
Syntax: | addfile <filename>[ <filetype>]
Descr.: | This command adds a file to the file history. Maximum no. is 5 files, the 6th pushes out the 1st.
Example: | addfile /usr/users/pc/guest/hahohihuhe.cal gds-ii
Note: | addfile is not implemented in the commandline version.

# Message Dialog Top

pause
Goal: | Show pause screen, enter for continue
Syntax: | pause [<text>]
Descr.: | This function shows a dialog with a message. Pressing <Enter> continues processing. Pause without a text shows a default message.
Example: | pause This is a great opportunity to get a cup of java! pause %{message_inside_alias}

# Exit / Quit Top

exit
Goal: | Exit
Syntax: | Exit
Descr.: | Close data- and process-file(s) and exits program
Example: | Exit

quit
Goal: | Quit
Syntax: | Quit
Descr.: | Close data- and process-file(s) and exits program
Example: | Quit