next up previous contents index
Next: Layers - Extraction Support Up: Main Functions 3 Previous: Layer Database   Contents   Index

Layers

(int) GetLayerLayerNum(stdlyr)
Return the component layer number associated with the layer indicated by the standard layer argument.

(int) GetLayerPurposeNum(stdlyr)
Return the purpose number associated with the layer indicated by the standard layer argument.

(string) GetLayerAlias(stdlyr)
This function returns a string containing the alias name of the layer indicated by the standard layer argument. The string will be null if no alias is set.

(int) SetLayerAlias(stdlyr, alias)
This function sets the alias name of the layer indicated by the standard layer first argument to the string given as the second argument, as for the LppName technology file keyword. The alias name is an optional secondary name for a layer/purpose pair. Most if not all functions that take a layer name argument will also accept an alias name.

The alias name will hide other layers if there is a name clash. This can be used for layer remapping, but the user must be careful with this. Layer name comparisons are case-insensitive.

Unlike the normal layer names, the alias name can have arbitrary punctuation, embedded white space, etc. However, leading and trailing white space is removed, and if the resulting string is empty or null, the existing alias name (if any) will be removed.

The function returns 1 if the alias name is applied to the layer, 0 if an error occurs. It is not possible to set the same name on more than one layer.

(string) GetLayerDescr(stdlyr)
This function returns a string containing the description of the layer indicated by the argument, which is a standard layer argument or derived layer name string. If no description has been set, a null string is returned.

(int) SetLayerDescr(stdlyr, descr)
This function sets the description of the layer indicated by the first argument, which is a standard layer argument or a derived layer name string, to the string given as the second argument. The description is an optional text string associated with the layer. The function always returns 1.

(int) IsLayerDefined(name)
The string argument contains a layer name. This can be the standard layer[:purpose] form, or can be an alias name. This function returns 1 if the argument can be resolved as the name of a layer in the layer table, in the current (electrical/physical) mode. If the layer can't be resolved, 0 is returned. The function will fail fatally if the argument is null or empty.

(int) IsLayerVisible(stdlyr)
The function returns 1 if the layer indicated by the argument, which is a standard layer argument or a derived layer name string, is currently visible (i.e., the visibility flag is set), 0 otherwise. If the layer is derived, the return is the flag status, derived layers are never actually visible.

(int) SetLayerVisible(stdlyr, visible)
This will set the visibility of the layer indicated in the first argument, which is a standard layer argument or a derived layer name string. The layer will be visible if the boolean second argument is nonzero, invisible otherwise. The previous visibility status is returned. If the layer is derived, the flag status is set, however derived layers are never visible.

(int) IsLayerSelectable(stdlyr)
The function returns 1 if the layer indicated by the argument, which is a standard layer argument or a derived layer name string. is currently selectable (i.e., the selectability flag is set), 0 otherwise.

(int) SetLayerSelectable(stdlyr, selectable)
This will set the selectability of the layer indicated in the first argument, which is a standard layer argument or a derived layer name string. The layer will be selectable if the boolean second argument is nonzero, not selectable otherwise. The previous selectability status is returned.

(int) IsLayerSymbolic(stdlyr)
The function returns 1 if the layer indicated by the argument, which is a standard layer argument or a derived layer name string, is currently symbolic (i.e., the Symbolic attribute is set), 0 otherwise.

(int) SetLayerSymbolic(stdlyr, symbolic)
This will set the Symbolic attribute of the layer indicated in the first argument, which is a standard layer argument or a derived layer name string. The layer will be symbolic if the boolean second argument is nonzero, not symbolic otherwise. The previous symbolic status is returned.

(int) IsLayerNoMerge(stdlyr)
The function returns 1 if the NoMerge attribute is set in the layer indicated by the argument, which is a standard layer argument or a derived layer name string, 0 otherwise.

(int) SetLayerNoMerge(stdlyr, nomerge)
This will set the NoMerge attribute of the layer indicated in the first argument, which is a standard layer argument or a derived layer name string. The layer will be given the NoMerge attribute if the boolean second argument is nonzero, or the attribute will be removed if present otherwise. The previous NoMerge status is returned.

(real) GetLayerMinDimension(stdlyr)
The return value is the MinWidth design rule value in microns for the layer indicated by the argument, which is a standard layer argument or a derived layer name string. If there is no MinWidth rule, or the DRC package is not available, 0 is returned.

(real) GetLayerWireWidth(stdlyr)
The function returns the default wire width for the layer indicated by the argument, which is a standard layer argument or a derived layer name string.

(int) AddLayerGdsOutMap(stdlyr, layer_num, datatype)
This function will add a mapping from the layer in the first argument (a standard layer argument or a derived layer name 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 the layer number or data type number is out of range. The acceptable range for the layer number and data type is [0 - 65535].

(int) RemoveLayerGdsOutMap(stdlyr, layer_num, datatype)
This function will remove a GDSII output layer mapping for the layer indicated in the first argument (a standard layer argument or a derived layer name string). The mapping may have been applied in the technology file, with the Tech Parameter Editor panel from the Attributes Menu, 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 number or data type is out of range. Otherwise, the return value is the number of mappings removed.

(int) AddLayerGdsInMap(stdlyr, string)
This function adds a GDSII input mapping record to the layer whose name is indicated in the first argument (a standard layer argument or a derived layer name string). 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 error. The function returns 1 if the mapping is successfully added.

(int) ClearLayerGdsInMap(stdlyr)
This function deletes all of the GDSII input mappings applied to the layer indicated in the argument, which is a standard layer argument or a derived layer name string. These mappings may have been applied through the technology file, added with the Tech Parameter Editor from the Attributes Menu, 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(stdlyr, datatype)
This function assigns a data type to be used for objects with the DRC skip flag set. The first argument is a standard layer argument indicating a physical layer or a derived layer name string. 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: Layers - Extraction Support Up: Main Functions 3 Previous: Layer Database   Contents   Index
Stephen R. Whiteley 2024-09-29