Xic has a batch mode of operation, where Xic will start without graphics, run commands, and exit. Batch mode is signaled by giving the -B option in the command line, in one of the following forms:
In the first form, the path to a file containing Xic script statements immediately follows ``-B'' with no space. The statements in the script file will be executed after the first input file is loaded. If no input file is given on the command line, the script will be executed after the default ``noname'' cell is loaded.
It is possible to pass parameters to the batch-mode scripts from the command line. The comma is used as a delimiter. Commas in the line that remain in single or double quotes after the shell has treated the line are not taken as separators. The entire construct should not have any embedded white space, except when single or double quoted as part of the values.
The param1, param2, etc. are the names of variables that will be defined in the execution context of the script. These variables will be set to value1, value2, etc. The values are numbers, strings, or executable text. Values that contain white space must be quoted, but note that the shell will strip the quote marks, so that a string constant should be single and double quoted as shown below.
xic -Bmyscript,p1=1.234,p2='"a string"',p3="p1 + 1"
This translates into the virtual addition of three lines to the beginning of the script:
p1 = 1.234
p2 = "a string"
p3 = p1 + 1
In the second form, the ``-B'' is immediately followed by another `-' and one of the command keywords listed below. After the first cell is loaded (or ``noname'' if no input file was named in the command line) the command will be executed. The recognized commands are listed below.
The command name can be immediately followed by an argument string that begins with the `@' character. The arguments are specific to the command. Multiple arguments can be separated by `@' characters, or by white space if quoted.
The .xicstart file is read and executed (if it exists) before the first cell is loaded, and all other initialization is performed in the normal sequence. The commands below are simple shortcuts to common operations. If unavailable options are required, then these can either be set in a .xicinit or .xicstart file, or the first form of the -B option should be used.
The default name for the file written is the name of the current cell, suffixed with ``.cgx'', ``.cif'', ``.gds'', and ``.oas'' for the four archive file formats. Native cell files always have the same name as the cell contained.
These commands can take the following options. The options are separated from the command name and from one another by `@' characters, and consist of a single character identifier, an optional `=' character, and a value.
|e or e1
|Use both pre- and post-filtering.
|Use pre-filtering only.
|Use post-filtering only.
|No empty cell filtering (no operation).
xic -B-togds@o=file1.gds@w=100,200,200,300@fc@l=+0600 myfile.gds
This will create file1.gds, containing objects on layer 0600 within the window area, flattened and clipped. Note that the @ separation character is actually optional after flags, and other options which are not lists or strings.
There are optional arguments that can be provided, separated from the command name and from each other with `@' characters.
In batch mode, the log files for reading and writing of files are written to the current directory.