Next: Selections
Up: Geometry Creation and Management
Previous: Layers
Contents
Index
There is provision for a layer aliasing mechanism which is applied
when a data file is read. This capability is exported through an
interface consisting of the UseLayerAlias variable and the
script functions described below. There is also a !lal command
which provides similar functionality.
- (int) ReadLayerAliases(handle_or_filename)
The argument can be either a string giving a file name, or a file
handle as returned from the Open function or equivalent (opened
for reading). This function will read layer aliases, adding the
definitions to the layer alias table. The format consists of lines of
the form
name=newname
where both name and newname are four-character CIF-type
layer names, and there is one definition per line. Lines with a
syntax error or bad layer name are silently ignored. When the layer
alias table is active, layers read from an input file will be
substituted, i.e., if a layer named name is read, it will be
replaced with newname. For data formats that use layer number
and datatype numbers, such as GDSII, the layer names should be in the
form of a four-byte hex number, using upper case, where the left two
bytes represent the hex value of the layer number, zero padded, and
the right two bytes represent the zero padded datatype number. The
function returns 1 on success, 0 otherwise.
- (int) DumpLayerAliases(handle_or_filename)
The argument can be either a string giving a file name, or a file
handle as returned from the Open function or equivalent (opened
for writing). This function will dump the layer alias table. The
format consists of lines of the form
name=newname
with one definition per line, where name and newname are
CIF-type four character layer names, with newname being the
replacement. The function returns 1 on success, 0 otherwise.
- (int) ClearLayerAliases()
This function will remove all entries in the layer alias table.
The function always returns 1.
- (int) AddLayerAlias(lname, new_lname)
This function will add the layer name string new_lname as an
alias for the layer name string lname to the layer alias table.
If an error occurs, or an alias for lname already exists in the
table (it will not be replaced) the function returns 0. The function
otherwise returns 1.
- (int) RemoveLayerAlias(lname)
This function removes any alias for lname from the layer alias
table. The function always returns 1.
- (string) LayerAlias(lname)
This function returns a string containing the alias for the passed
layer name string, obtained from the layer alias table. If no alias
exists for lname, a null string is returned.
Next: Selections
Up: Geometry Creation and Management
Previous: Layers
Contents
Index
Stephen R. Whiteley
2006-10-23