where option is one of the following:
- [list] children [name]
- List all of the children definitions of cell use name, or the children of the currently selected cell instance.
- [list] parent [name]
- List the parent cell definition of cell use name, or the parent of the currently selected cell instance.
- [list] exists|self [name]
- Returns the name of the instance if the cell exists, or false (0) if the instance does not exist (is not loaded into the database; the cell may still exist on disk). If name is not present, returns the name of the currently selected instance.
- [list] allcells
- List all of the cell instances in the database. Note that expansion is not automatic, so cells that are not expanded are not searched.
The instance command performs various operations on cell uses, or instances. For the first four options listed above, instance lists cells by their relationship to cell use name, or to the current selection if no name is given. The optional argument list returns the result as a list. In particular, in the Tcl version of magic, this list is a Tcl result that may be operated on by Tcl procedures.
instance is implemented as a built-in function in magic The Tcl version of magic returns Tcl results when the "list" option is present. instance is essentially an alias for the cellname command, and takes many of the same options, but references are to cell instances rather that cell definitions (q.v.). A number of options to cellname are meaningless for instances.
The command option instance list exists is nonsensical from the standpoint of the end-user (if the cell is selected, of course it exists). However, it is a very useful function for Tcl scripts to determine the name of the cell instance that is currently selected.
Technically, instance rename should be implemented as a replacement for the command identify.
|Return to command index|
Last updated: October 8, 2004 at 8:06am