next up previous contents index
Next: Selections Up: Main Functions 3 Previous: Grid   Contents   Index

Layers

(int) SetCurLayer(name)
The string argument contains a layer name. Calling this function sets the current layer to the named layer. The function will fail if the named layer does not exist.

(int) SetCurLayerAlias(longname)
This function sets the long name of the current layer to the string given as an argument. The long name is an optional secondary name for a layer. Most if not all functions that take a layer name argument will also accept a long name. The long name can contain any characters, but it should not match the short or long name of another layer. Matching of the long name, as with the regular name, is case-sensitive. The function returns 1 if the long name is applied to the current layer, 0 if there is no current layer.

(int) SetCurLayerDescr(description)
This function sets the description of the current layer to the string given as an argument. The description is an optional text string associated with the layer. The function returns 1 if the description is applied to the current layer, 0 if there is no current layer.

(int) NewCurLayer(name)
The current layer is set to the named layer. If the named layer does not exist, it will be created. If the name is not a valid CIF layer name (four characters maximum, all alphanumeric) and a new layer is created, its name will be truncated to the first four characters, and any non-alphanumeric characters are replaced with `X'. The original name will be saved as the long name (alias) for the new layer. The function will fail if the name is null, empty, or contains only white space.

(string) GetCurLayer()
This function returns a string containing the name of the current layer.

(string) GetCurLayerAlias()
This function returns a string containing the long name of the current layer. If no long name has been set, a null string is returned.

(string) GetCurLayerDescr()
This function returns a string containing the description of the current layer. If no description has been set, a null string is returned.

(int) AddLayer(layer_name)
This adds the named layer to the end of the layer table, much like ``!ltab add layer_name'' and ``!layer layer_name''. The string passed should contain only one name, unlike ``!ltab add''. This returns 1 on success, 0 on error. See the !ltab and !layer command descriptions.

(int) RemoveLayer(layer_name)
This removes layer_name from the layer table, much like ``!ltab remove layer_name''. The string passed should contain only one name, unlike ``!ltab remove''. This returns 1 on success, 0 on error.

(int) RenameLayer(oldname, newname)
This renames the layer named in oldname to newname, much like ``!ltab rename''. This returns 1 on success, 0 on error.

(stringlist_handle) LayerHandle(down)
This function returns a handle to a list of the layer names from the layer table. If the argument is 0, the list is in ascending (left to right) order. If the argument is nonzero, the list is in descending order. The layers used in the current mode are listed.

(string) GenLayers(stringlist_handle)
This function returns a string containing a layer name from the layer table. The argument is the handle returned by LayerHandle. A different layer is returned for each call. The null string is returned after all layers have been cycled through. This is equivalent to ListNext.

(int) IsLayerDefined(lname)
This function returns 1 if the string argument can be resolved as the name of a layer in the layer table, in the current (electrical/physical) mode. The argument can match either the displayed short name or the long name or a layer. If the layer can't be resolved, 0 is returned. The function will fail fatally if the argument is null or empty.

(int) IsLayerVisible(lname)
The argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The function returns 1 if the layer is currently visible (i.e., has the visibility flag set), 0 otherwise.

(int) SetLayerVisible(lname, visible)
The first argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The second argument will set the layer visibility, visible if nonzero, invisible otherwise. The previous visibility status is returned. The display is not redrawn, use the Redraw function if necessary.

(int) IsLayerSymbolic(lname)
The argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The function returns 1 if the layer is symbolic (i.e., has the Symbolic attribute set), 0 otherwise.

(int) SetLayerSymbolic(lname, symbolic)
The first argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The second argument will set the layer Symbolic attribute if nonzero, unset it otherwise. The previous Symbolic status is returned.

(int) IsLayerNoMerge(lname)
The argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The function returns 1 if the layer has the NoMerge attribute set, 0 otherwise.

(int) SetLayerNoMerge(lname, nomerge)
The first argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The second argument will set the layer NoMerge attribute if nonzero, unset it otherwise. The previous NoMerge status is returned.

(real) GetLayerMinDimension(lname)
The argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The return value is the MinWidth design rule value for the layer, in microns. If there is no MinWidth rule, or the DRC package is not available, 0 is returned.

(real) GetLayerWireWidth(lname)
The argument is a string giving the name of a layer in the current display mode. If the string is empty or null, the current layer is understood. The function will fail if a name is given which is not a layer name. The function returns the default wire width for the layer.

(int) AddLayerGdsOutMap(lname, layer_num, datatype)
This function will add a mapping from the layer named in the first argument (a string) to the given GDSII layer number and data type. The layer number and data type are integers which define the layer in the GDSII world. When a GDSII file is written, the present layer will appear on the given layer number and data type in the GDSII file. It is possible to have multiple mappings of the layer, in which case the geometry from the named layer will appear on each layer number/data type given.

The function returns 1 on success, or 0 if an error occurred, in which case no mapping has been created. If the layer name is not found in the layer table for the present mode (physical or electrical), or the layer number or data type number is out of range, 0 is returned. The acceptable range for the layer number and data type is [0 - 65535].

(int) RemoveLayerGdsOutMap(lname, layer_num, datatype)
This function will remove a GDSII output layer mapping for the layer named in the first argument (a string). The mapping may have been applied in the technology file, with the Conversion Parameter Editor, panel, or by calling the AddLayerGdsOutMap function. The mappings removed match the given layer number and data type integers provided. These are in the range [-1 - 65535], where the value `-1' indicates a wild-card which will match all layer numbers or data types.

The return value is -1 if the layer name can't be found in the layer table for the present mode (physical or electrical), or if the layer number or data type is out of range. Otherwise, the return value is the number of mappings removed.

(int) AddLayerGdsInMap(lname, string)
This function adds a GDSII input mapping record to the layer whose name is given as the first argument. The second argument is a string listing the layer numbers and data types which will map to the named layer, in the same syntax as used in the technology file. This is ``l1 l2-l3 ..., d1 d2-d3 ...'', where there are two comma separated fields. the left field consists of individual layer numbers and/or ranges of layer numbers, similarly the right field consists of individual data types and/or ranges of data types. Each field can have an arbitrary number of space-separated terms. For each layer listed or in a range, all of the data types listed or in a range will map to the named layer. There can be multiple input mappings applied to the named layer.

The function returns 0 if there was a syntax or other error, including the named layer not being found in the layer table for the current mode (physical or electrical). The function returns 1 if the mapping is successfully added.

(int) ClearLayerGdsInMap(lname)
This function deletes all of the GDSII input mappings applied to the layer named in the argument. These mappings may have been applied through the technology file, added with the Conversion Parameter Editor, or added with the AddLayerGdsInMap function. This function returns 0 if the layer name does not exist in the symbol table for the current display mode (physical or electrical). Otherwise, the return value is the number of mapping records deleted.

(int) SetLayerNoDRCdatatype(lname, datatype)
This function assigns a data type to be used for objects with the DRC skip flag set. The first argument is the name of the (physical) layer. The second argument is the data type in the range [0 - 65535], or -1. If -1 is given, any previously defined data type is cleared. The function returns 0 if the layer name can't be resolved, or the data type is out of range. The value 1 is returned on success.


next up previous contents index
Next: Selections Up: Main Functions 3 Previous: Grid   Contents   Index
Stephen R. Whiteley 2012-04-01