Class with the global layer setup. More...
layers is the global layer table for every open layout window. Like setup it is a static class: you never construct it, and you cannot use it as a type. In a C++ macro the members are reached with the prefix layers::. Each layer is layers::num[i] for a number from 0 up to the internal maximum. displayedLayers is how many layer controls the dock and the menu show (default 128, up to 11000). showAllLayer, hideAllLayer, enableAllLayer and disableAllLayer change visibility or the dock list for the whole table. findLayer looks up a name and returns the lowest matching number, or -1. Technology helpers (technologyLayerAdd, technologyLayerSetParameter, findLevel, globalVia) describe vias and conductors for extraction and 3d. In Python the array num is not used; call layers.number(10) instead.
Example:
layers::num[5].name = "Layer Number 5";
layers::showAllLayer();
int poly = layers::findLayer("POLY");
if (poly >= 0)
layers::num[poly].visible = true;
layers::disableUnusedLayers(layout->drawing);
In Python:
layers.showAllLayer()
layers.number(10).disable()
layers.number(9).name = "layer nine"
Disables every layer. No shapes are drawn, and the layer dock lists none of them. Call enable on a layer for those you still need.
The highest layer number shown in the layer menu and the layer dock. The default is 128. Values up to 11000 are allowed; a very large number of controls can slow down start-up.
Disables every layer that is not used in design.
Enables every layer from 0 to displayedLayers. The dock, the layer menu and the drawing all show those layers.
Searches for a layer named layerName. If several layers share the name, the lowest number is used.
Returns: that layer number, or -1 if layerName is not used.
Returns: the layer used for technology level i, or -1 if that level is unused.
Returns: the layer used for global vias, or -1 if the technology setup has no global via.
Makes every layer invisible in the drawing. The layers remain in the menu and the dock, marked as invisible.
Hides every layer that is not used in the cell currently displayed in d. After this, every still-visible layer is used in that cell.
Hides every layer that is not used anywhere in design d. Unlike hideCurrentUnusedLayers, this searches all cells, not only the cell on screen.
Loads layer settings from filename.
Returns: true if the settings were loaded, false if the file format is not supported.
Returns: the number of layers in the LayoutEditor.
Array of layer objects. In C++ use layers::num[5]. In Python use number instead.
Returns: the number of technology levels in the current setup.
Turns off the 3d view of every layer and resets it.
Makes every layer visible.
Marks layer as a technology layer. If type is 1, the layer is a via. If type is 2, the layer is a conductor.
Returns: the conductor size if layer is a conductor layer, otherwise -1.
Returns: the conductor spacing if layer is a conductor layer, otherwise -1.
Returns: technology parameter parnum of layer.
Currently these parameters are used:
| parnum: | usage: |
|---|---|
| 0 | level of the layer. If level is set to -2 that layer is a global via. |
| 1 | conductor layer: width, via layer: size of the via |
| 2 | conductor layer: spaceing between two shapes, via layer: distance via edge - conductor at top layer |
| 3 | via layer: distance via edge - conductor at bottom layer |
| 4 | via layer: spacing between two vias |
| 5 | via layer: shape of the via with 0= square via, 1= round via/square conductor, 2= round via/conductor |
Returns: the type of layer, using the same values as technologyLayerAdd.
Clears the technology information of every layer.
Sets technology parameter parnum of layer to value. See technologyLayerGetParameter for the meaning of parnum.
| Parameter: | |
|---|---|
| layer | layer number |
| parnum | parameter index |
| value | new value |
Fills the technology level order (vias and conductors) from the current 3d settings.