Hi, Matthias!
Thank you for explanation! I tried and it works!
However, shape with prop_id set to 0 still reports True for has_prop_id. I think will be good idea to fix this too.
Related question: it seems that Shape does not have API to clear prop_id. It will be nice to have, but I have workaround to ignore shapes layers with copied shapes.
Hi, Matthias!
Thank you for help! It works!!! Just little clarification :-)
cell = selected_object.layout().cell(selected_object.cell_index())
My layout is non-hierarchical and all cells are unique, so it simplifies task a lot :-)
Hi!
I may be mistaken, but DRC/LVS scripts are written on Ruby.
pya module is defined in KLayout 's built-in Python interpreter, so should be executed only there, not in standalone Python. See https://www.klayout.de/doc-qt5/code/index.html for lis…
Hi, David!
See LayoutView.begin_layers or LayoutView.each_layer (https://www.klayout.de/doc-qt5/code/class_LayoutView.html).
See example in https://klayout.de/forum/discussion/2383/how-to-set-a-layer-to-active.
Hi, Matthias!
I tried to do such screenshots for multiple views opened in KLayout (with similar layer properties for each of them) and suggested workaround for 0.28.9 (pya.Application.instance().process_events()) and your fix in 0.28.12 work only f…
Hi!
* You could watch project on GitHub to get release updates.
* Release Notes clearly highlight bug fixes and enhancements, including those, related to performance.
Hi, Pascal!
I'm not sure if there are better ways to do so, but you could create new layer and copy only text shapes there, than remove old layer and set proper layer/datatype to new one.
Hi, Matthias!
Use case is to tweak default appearance of some of LayoutViewWidget widgets while processing MainWindow.on_current_view_changed/on_view_created. For example, hiding/showing cells and layers panels.
Sorry, my bad, I didn't notice that this is methods of LayoutViewWidget. But nevertheless, LayoutViewWidget stuff is referenced in LayoutView as part of internal API.
Hi, Kumaran!
See https://www.klayout.de/doc-qt5/programming/index.html and https://www.klayout.de/doc-qt5/code/index.html.
You could find a lot of examples on this forum.
Hi!
I think LayoutView.each_layer should work for you. I used LayoutView.begin_layers because of more complicated situations like layer properties deletion.
Hi!
If you want to hide entire layer content, you could find layer properties for given layer/datatype iterating LayoutView.begin_layers()/end_layers() and than set LayerProperties.visible to False.
Hi, Raji!
I think you need to create text labels in layout (see Layout, Shape (how to add) and LayerProperties (how to make layer visible)) and than use LayoutView.save_image or LayoutView.save_image_with_options.