It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
I am trying to create a layer to play the interesting code that discussed as posted directly, instead of using " New layer " function manually. but seems not easy for me, please refer to below code, and your suggestion will be appreciated. This code is not worked, but after running this, the create layer function " New layer " will be failed also, and alarm occurred
layout = pya.Application.instance().main_window().current_view().active_cellview().layout()
top = pya.Application.instance().main_window().current_view().active_cellview().cell
cell_index = top.cell_index()
metal = layout.layer(9, 0)
metal_layerinfo = pya.LayerInfo(9, 0)
layout.insert_layer_at(9, metal_layerinfo)
Comments
Hello,
Finally, I found the past discussion as below, it helps, thanks.
https://www.klayout.de/forum/discussion/1193/creating-a-layer-with-a-name#latest
Very good you figured out yourself!
Actually
already generates the layer while
makes it visible.
Matthias