Ruby macro changes in editor not showing up when running

I have a ruby lym file and a rb file loaded in the macro development editor.
I am using version 0.30.5
Both files are in my \macros directory.

the lym File:

module TestMacro1
include RBA
require_relative 'C:\Users\david\KLayout\macros\helper'
# Enter your Ruby code here ..
a=4
b=helper(a)

end

the rb file with a function I want to call

include RBA

def helper( a)
b=a+1
return b
end

The first time I run it after starting Kayout, the helper() function gets called and returns 5.
Now I edit the helper() function to set b=a+10. I save it with the buttons on the top of the left panel, and also
right click on the helper function an click 'refresh'.

When I run TestMacro1.lym (from green triangle with the exclamation point in the editor), helper still sets b=5, not 14 reflecting the change.
I can put break points in helper() and see the b variable be assigned to 5 even though the code says it should be a+10.
If I add another line like 'c=9' before 'return b' in helper, the function just exits and does not create the c variable.

How do we get the editor to save and use the edited version of the files.
This was never a problem back in version 0.24.

I have tried running Klayout as administrator and closing and reopening the macro dev window.
The only thing that works is closing and re-opening Klayout.

Thanks for any help.

Sign In or Register to comment.