next up previous contents index
Next: Reading Input With the Up: The Open Button: Open Previous: The Open Button: Open   Contents   Index

Input to the Open Command

The text given to the Open command must contain at least one and at most two names. If a name contains white space, the name must be quoted with double quote marks ("name with space") for it to be recognized as a single token. The first name is generally that of a multi-cell source, such as a path to a layout file. The second name, which is optional, is the name of a cell from that source to open as the current cell. If not given, depending on the source, either a default cell is opened, or the user is presented a list of cells from which to choose. If a single name is given, it can also be the name of a cell in memory, or the name of a cell resolvable through a library or the search path for native cells.

In short, the first or only name given can be one of the following.

In each of the cases above, a second name can appear, giving the name of a cell to open. If no cell name is given, the action depends on the type of source. An OpenAccess library source requires that a cell name be given, otherwise the OpenAccess database is not consulted.

If no cell name is given and the source is a layout file containing only one top-level cell, that cell will be opened. If there are multiple top-level cells, a pop-up will appear allowing the user to choose which cell to open. These calls will already be in memory, the choice simply defines the current cell for editing.

If the source is a CHD and no cell name is given, the CHD's default cell will be opened. This is either a cell configured into the CHD, or the first (lowest offset) top-level cell found in the original layout file. There will never be a selection pop-up with a CHD source.

If the file is a library file, the second argument should be one of the reference names from the library, or the name of a cell defined in the library. If no second name is given, a pop-up listing the library contents will appear, allowing the user to select a reference or cell.

The Open command can access the internet. The name given to the Open command can be in the form of a URL, followed by options. The URL must begin with ``http://'' or ``ftp://'', and the file is expected to be suitable Xic input.

There is presently only one option that can follow the url:

-o filename
Ordinarily a temporary file is used for downloading, which is destroyed. The user must save the hierarchy to retain a copy on the user's machine. If this option is given, the downloaded file will be saved in the given file and not destroyed.

If the name can not be resolved as a source archive as described above, it may be the name of one of the special library files. If not, it is taken as a name for a cell. If it can not be resolved as a known cell, a new, empty cell is created with that name.

If the name of the file given is that of the present model library (default ``model.lib'') or device library (default ``device.lib''), the library file is first copied into the current directory if it doesn't exist there, and the file in the current directory is then opened for text editing. These files contain the devices and some of the models used in electrical mode for producing SPICE files.

Cells can also be opened for editing within Xic by dragging the name from a file manager and dropping in the main drawing window, or by pressing the Ok or Open buttons in the File Selection panel. Files can also be opened from the Open buttons in the files, cells, and contents listing pop-ups in the File Menu. These are all equivalent to opening the cell with the Open command, so that the information in this section applies in those cases.

If the name string given to edit matches the name of a cell in memory, the editing context is switched to that cell, and no disk file is read in this case. However, if the name given to edit contains a directory separation character, i.e., is a path, then Xic will always attempt to read the file from disk. Thus, if the user wants to re-read a native cell file from disk, if the cell is already in memory, the user should add a path prefix to the name. For example ``./noname'', assuming noname is in the current directory, will force Xic to read the disk file, even if the noname cell is already in memory.

The interpretation of any path prefix which is included with the name of a native file to open for editing is set by the variables NoReadExclusive and AddToBack. The top level cell will always be read from the given file if a path to the file is specified. Subcells are resolved by cell name only through the search path. The search path is modified during the read according to the state of the NoReadExclusive and AddToBack variables.

All of the settings in the Setup page of the Import Control panel (from the Convert Menu) apply. However, none of the options, such as layer filtering or cell name modification, found in the Read File page of the same panel apply in this case. If these options are needed, the Read File button in this page should be used to read the file, rather than the Open command. Note that this is different from pre-3.0.0 releases, in which cell name case changes and file-based aliasing were supported in the Open command.

The table in 14.1 lists the variables and modes that apply to the Open and similar commands.


next up previous contents index
Next: Reading Input With the Up: The Open Button: Open Previous: The Open Button: Open   Contents   Index
Stephen R. Whiteley 2024-09-29