It looks like you're new here. If you want to get involved, click one of these buttons!
I get an error with Klayout 0.25.7 on Windows with the following script when I have an instance in the selection.
import pya lv = pya.LayoutView.current() for obj in lv.object_selection: if obj.is_cell_inst(): cell = obj.inst().cell for layer in lv.each_layer(): layer_index = layer.layer_index() shapes = cell.shapes(layer_index)
The error message is
Cannot call non-const method on a const reference in Cell.shapes.
The same script works correctly with Klayout 0.52.2 on Debian Linux.