next up previous contents index
Next: Error Reporting Up: Utility Functions Previous: Bitwise Logic   Contents   Index

Cell Name Enumeration

(stringlist_handle) InitGen()
This function returns a handle to a list of names of cells used in the hierarchy of the current cell, either the physical or electrical part according to the current mode. Each cell is listed once only, and all cells are listed, including the current cell which is returned last.

(stringlist_handle) CellsHandle(cellname, depth)
This function returns a handle to a list of subcell names found in cellname, to the given depth. If cellname is null or empty, the current cell is assumed. The depth is the search depth, which can be an integer which sets the maximum depth to search (0 means search cellname only and return its subcell names, 1 means search cellname plus its subcells, etc., and a negative integer sets the depth to search the entire hierarchy). This argument can also be a string starting with `a' such as "a" or "all" which indicates to search the entire hierarchy. The listing order is as a tree, with a subcell listed followed by the descent into that subcell.

With ``all'' passed, the output is similar to that of the InitGen function, except that the top-level cell name is not listed, and duplicate entries are not removed (ListUnique can be called to remove duplicate names).

(string) GenCells(stringlist_handle)
This function returns a string containing the name of one of the cells in the hierarchy of the current cell. The argument is the return value from InitGen or CellsHandle. A different cell is returned for each call. The null string is returned after all cells have been returned.

Example:

This script will list all of the cells in the current hierarchy:
i = InitGen()
while ((name = GenCells(i)) != 0)
   Print(name)
end


next up previous contents index
Next: Error Reporting Up: Utility Functions Previous: Bitwise Logic   Contents   Index
Stephen R. Whiteley 2006-10-23