It looks like you're new here. If you want to get involved, click one of these buttons!
I am very new to Klayout scripting and would like to write my first script (ruby and/or python) which does the following:
Select a cell in a layout using cell name (e.g. “example_cell”) and change gds layer from original layer to a new layer (e.g. change from layer 112/2 to layer 101/1).
I have written the following code to generate the new gds layer (don’t know if it is the best way to do it but it works), now I’m missing the part to select cell “example_cell” and change gds layer.
app = RBA::Application.instance
mw = app.main_window
layout_view = mw.current_view
layer_info = RBA::LayerInfo.new(101,1)
layer_pn = RBA::LayerPropertiesNode::new
layer_pn.source = layer_info.to_s
layout_view.insert_layer( layout_view.end_layers, layer_pn )
Thanks for support.