next up previous contents index
Next: Layer Alias Table Up: Geometry Creation and Management 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.

(string) SetCurLayerExKeyword(string)
The string argument is an extraction keyword and associated text, as would appear in a layer block in the technology file. The specification will be applied to the current layer, overriding existing settings and possibly causing incompatible or redundant existing keywords to be deleted. This is similar to the editing functions of the Edit Extraction command in the Extract Menu.

The return is a status or error string, which may be null.

The following keywords can be specified:

Conductor
Routing
GroundPlane
GroundPlaneDark
GroundPlaneClear
TermDefault
Contact
Via
DarkField
Symbolic
Resistance
Capacitance
Tranline
Thickness
Rho
Sigma
EpsRel
Lambda

(int) RemoveCurLayerExKeyword(keyword)
This will remove the specification for the extract keyword given in the argument from the current layer. The argument must be one of the keywords listed for SetCurLayerExKeyword. The return value is 1 if a specification was removed, 0 otherwise.

(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 simply an alias for ListNext.

(int) IsLayerConductor(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 Conductor keyword is given or implied for the layer, 0 otherwise. This attribute applies to physical layers only.

(int) IsLayerRouting(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 Routing keyword is given for the layer, 0 otherwise. This attribute applies to physical layers only.

(int) IsLayerGround(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 one of the GroundPlane keywords was given for the layer, 0 otherwise. This attribute applies to physical layers only.

(int) IsLayerContact(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 return 1 if the Contact keyword is given for the layer, 0 otherwise. This attribute applies to physical layers only.

(int) IsLayerVia(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 Via keyword is given for the layer, 0 otherwise. This attribute applies to physical layers only.

(int) IsLayerDarkField(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 DarkField keyword is given or implied for the layer, 0 otherwise. This attribute applies to physical layers only.

(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.

(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 minimum dimension in microns for the layer. This is obtained from the applied design rules for physical layers, and the return value will be 0 for electrical layers.

(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.

(real) GetLayerThickness(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 value of the Thickness parameter given for the layer, if any. This attribute applies to physical layers only.

(real) GetLayerRho(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 resistivity of the layer as given by the Rho or Sigma parameters, if given. These attributes apply to physical layers only.

(real) GetLayerEps(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 relative dielectric constant for the layer, as given by the EpsRel parameter if applied. This attribute applies to physical layers only.

(real) GetLayerLambda(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 value of the Lambda parameter for the layer, if given. This attribute applies to physical layers only.

(real) GetLayerResis(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 value of the Resistance parameter for the layer, if given. This attribute applies to physical layers only.

(real) GetLayerCap(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 per-area capacitance for the layer, if given. This attribute applies to physical layers only.

(real) GetLayerCapPerim(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 per-perimeter capacitance for the layer, if given. This attribute applies to physical layers only.

(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 - 255].

(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 - 255], 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 - 255], 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: Layer Alias Table Up: Geometry Creation and Management Previous: Grid   Contents   Index
Stephen R. Whiteley 2006-10-23