bug on 'each_image_selected' ?

edited May 2021 in Ruby Scripting

Hi all,
Adding an image to a layout and select this image
and run the macro:

module MyMacro
   include RBA
if v=LayoutView::current
 v.each_image_selected do |i|
   puts i.id
 end 
end

end

I get the exception:
Exception code: 0xc0000005
Program Version: KLayout 0.26.12 (2021-04-24 r36d8c08d2) AMD64
Backtrace:
0x7ffddcbf4452 - (msvcrt.dll) +476242
0x6fce2a38 - (libstdc++-6.dll) +666168
0x63ccd1a6 - (klayout_img.dll) +53670
0x63a9b1 - (klayout_rba.dll) +43441
....

If I use only each_image all is fine.
Is there another way to check if an image is selected?

Is there a way to enable/disable the possibility to select an image via script?

Best regards
Frank

PS.:
same in new version 0.27

Comments

Sign In or Register to comment.