next up previous contents index
Next: The Save As Device Up: The File Menu: Xic Previous: The Save Button: Save   Contents   Index


The Save As Button: Save Cell, Renaming

The Save As button in the File Menu will save to disk the cell or hierarchy currently being edited, possibly under a new name or file type.

If editing a cell from the device library, the Save As command will bring up the Library Cell Parameters panel (see 8.5), which allows device defaults to be edited, and has provision for saving the cell into a device library file or as a native cell file.

Otherwise, the Save File dialog appears which provides an expandable and selectable tree representation of the directory structure, rooted in the directory where the file was originally read from, or the current directory. The name or path to the file can be modified on the prompt line, or directories can be selected from the pop-up which will modify the prompt line.

If the default is accepted, the cell or hierarchy will be saved in the format of origin: one of the archive formats, or native.

The response string actually supports syntax which provides coercion to another format, and other features. The general form of the response string is:

[filetype] file_path [cellname]

If the first word in the string is a recognized file format keyword, which is a known file format suffix without the period, output will be generated in that format. The following filetype keywords are recognized:

CGX ``cgx''
CIF ``cif''
GDSII ``gds'', ``str'', ``strm'', ``stream''
OASIS ``oas''
OpenAccess ``oa''
Native ``xic''

If the first word is not one of the recognized format keywords, then it is taken as a path to the output to produce. If this path has a file extension from the list above, meaning that the file name ends with a period followed by one of the words from the table, this will specify that format type for output. This does not apply to OpenAccess, however.

OpenAccess is available only if the plug-in was successfully loaded (see [*]).

If the specified output format is one of the archive formats (CGX, CIF, GDSII, OASIS), then the entire cell hierarchy under the current cell will be saved in the output file produced.

If saving a hierarchy in CGX or GDSII format, the file name can be given an additional, final suffix ``.gz'', which will cause the file to be written in compressed (gzipped) format. These compressed files can be read into Xic directly, and can be uncompressed using the widely available GNU gzip or gunzip programs. Compression is supported for CGX and GDSII files only. The ``.gz'' suffix can be removed, if already present, to suppress compression.

If the file extension given is ``.xic'', then the current cell (not hierarchy) is saved in the file specified as a native cell file. The file, and the new cell name, will include the ``.xic'' extension. It is usually preferable to use the ``xic filetype keyword to coerce native output to avoid changing the cell name.

There are a number of ways to save to native symbol files, as explained below. The general form is

[xic] [word1 [word2]]

word1 word2 description
blank blank Save the current cell (only) as a native cell file in the current directory.
* blank A literal asterisk indicates to save all cells in the current hierarchy as native cell files in the current directory.
word blank If word is a path to an existing directory, save the current cell as a native cell file in that directory. If word is a path to an existing file, first move the existing file out of the way by giving it a .bak extension, then save the cell under the given file name. Otherwise, word is taken as a new name for the cell, which may contain a directory path. The native cell will be saved under that name.
word1 word2 The first word is taken as a directory path. This directory will be created if it doesn't exist, if possible. The second word is a new name for the cell. This must be a simple name, not a path. The current cell will be saved in the directory as a native cell file using the new name.
word . The first word is taken as a directory path. This directory will be created if it doesn't exist, if possible. The literal period as the second word indicates to save the current cell it the directory as a native cell file, using the present cell name. This form is useful to force creation of the directory.
word * The first word is taken as a directory path. This directory will be created if it doesn't exist, if possible. The literal asterisk as the second word indicates to save all cells in the hierarchy of the current cell, as native cell files in the directory.

The xic filetype specifier can be omitted if the source of the current cell is a native cell file. If omitted, in any case if the word1 is a path to an existing directory (including ``.'' as the current directory), the ``xic'' is understood, and the behavior is as described in the table above.

To save to an OpenAccess library, the ``oa'' filetype must be given, any added file extensions are not recognized. The remainder of the line is interpreted as follows:

word1 word2 description
blank blank The current cell is written to the library named in the OaDefLibrary variable.
* blank If only an asterisk appears, the current cell and its hierarchy are written to the library named in the OaDefLibrary variable.
library blank If a single word is given, it is taken as the name of a library in which to save the current cell. If no such library exists, the user will be prompted to create it.
library cell If two words are given, the first word is taken as the library name as above. The second word is the name that the current cell will be saved under, thus the OpenAccess cell name can be different.
library * If an asterisk follows the library name, the current cell and its hierarchy will be written to the library.

When a file is read into Xic, the full path to that file is saved within Xic, and that file is the default written to during a save. The previous version of a file that has been overwritten is saved in a file in the same directory with the same name, but with a ``.bak'' extension added. Cells that are created within Xic, i.e., that do not have a known origin file, are saved by default in the current directory. This includes native-format versions of cells that were read in as part of an archive file.


next up previous contents index
Next: The Save As Device Up: The File Menu: Xic Previous: The Save Button: Save   Contents   Index
Stephen R. Whiteley 2017-03-22