It looks like you're new here. If you want to get involved, click one of these buttons!
What is proper way to move set of layers (change their order) in Python? Or re-arrange cellviews order because in I need to move all layers belonging to particular cellview.
Comments
Hi,
the solution depends on what you want to achieve.
In any case I'd recommend to use the LayerIterator concept. "LayoutView#each_layer" isn't entirely stable for iterating while deleting (see https://github.com/KLayout/klayout/issues/368).
Here is some sample code that moves all layer with even GDS layer numbers to the end:
Kind regards,
Matthias
Hi, Matthias!
Thank you for help! Similar code pattern (I used active_cellview.index() as criteria) solved my problem!