Klayout Version = 0.28.12 (also tested on 0.29.4)
Python Version = 3.11.2
Access method = Macro Development IDE
Please see code below. clear_selection() works if i select all objects manually. However, i cant get the select_all() to select anything. Ive tried accessing the LayoutView in 2 different ways but that made no difference.
NB: in fact lv.select_all() seems to clear the selection !
Workaround suggested = mw.cm_select_all()
- However, note that this method is deprecated in the documentation.
- Also the number of returned items is NOT EQUAL to the manual selection in KLayout gui !!!
Testcase:
import pya
mw = pya.Application.instance().main_window()
#lv = pya.LayoutView.current()
lv = mw.current_view()
#lv.clear_selection()
lv.select_all()
print(f'selection_size = {lv.selection_size()}')
Klayout Version = 0.28.12 (also tested on 0.29.4)
Python Version = 3.11.2
Access method = Macro Development IDE
Please see code below. clear_selection() works if i select all objects manually. However, i cant get the select_all() to select anything. Ive tried accessing the LayoutView in 2 different ways but that made no difference.
NB: in fact lv.select_all() seems to clear the selection !
Workaround suggested = mw.cm_select_all()
Testcase: