Not working macro

edited November 2015 in General
Hello,

I have simple macro for loading layer properties files starting browsing from a certain folder.

That script used to work, but now using version 24.3 seems the browsing is not starting from the wanted folder.

The script is shown bellow:

<?xml version="1.0" encoding="utf-8"?>
<klayout-macro>
<description>Load Custom Layer properties</description>
<version/>
<category/>
<prolog/>
<epilog/>
<doc/>
<autorun>false</autorun>
<autorun-early>false</autorun-early>
<shortcut/>
<show-in-menu>true</show-in-menu>
<group-name/>
<menu-path>file_menu.load_layer_props</menu-path>
<interpreter>ruby</interpreter>
<dsl-interpreter-name/>
<text>module MyMacro

include RBA

file = RBA::FileDialog::ask_open_file_name(
"Select Layer Properties File",
"C:\\data\\klayout", # Enter your favorite folder here
"Layer Properties Files (*.lyp);;All Files (*)"
)
file && RBA::LayoutView::current.load_layer_props(file)

end
</text>
</klayout-macro>


What could be the reason that macro not to work properly any more?

Best regards,

tyanata

Comments

  • edited November 2015

    tyanata,

    Weird - it works for me, when I paste all that XML in to a new text file and save as Something.lym, then restart KLayout and attempt to open a .lyp file.

    I of course replaced

    C:\\data\\klayout 
    

    with

    C:\\Users\\David\\KLayout
    

    but indeed it starts from that folder for me.

    David

  • edited November -1

    Hi all,

    I also can't confirm there is an issue with that function. Maybe "c:\data\klayout" does not exist on your system or it's not accessible?

    Matthias

Sign In or Register to comment.