How do I start the Marker Browser in Ruby?

Hi there,

I'm trying to write a script to fire up KLayout to review DRC results. I can already launch KLayout to execute a ruby script and although my Ruby is pretty shoddy I've figured out how to load the GDS and layer definition file and resize the main window.

Next I'd like to open the marker browser, resize that window then load a DRC report file.

Can't figure out this next stage... Can you help me?

Thanks,

Simon

Comments

  • Hi - figured out how to open the Marker Browser by directly activating the menu.

    mw.menu.action("tools_menu.browse_markers").trigger()

    However I need to get the window object of the Marker Browser to resize it and need to figure out how to make it open an RDB file from Ruby,

  • Ok - found out how to get the window - in Python. Using App.topLevelWidgets you can search for the window by it's title. Once you have it you can move and resize it.

    I also found the documentation for the RDB classes on your website - so I can now load the RDB file. I can even find the combobox widget on the browser window and change the index to the loaded RDB file....

    ...however, this doesn't trigger the actions associated with a new RDB file. I searched your source code and you attach this to the "activate" signal of the ComboBox. (line 111 of https://github.com/klayoutmatthias/klayout/blob/master/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc )

    This executes only if the combobox is changed by the UI and NOT when it is changed in software.

    I have been scouring the internet to figure out how I can emit an activate signal into the window but so far haven't figured out how.

    Any ideas on how to proceed?

    Simon

  • Hi Simon,

    LayoutView#show_rdb opens the marker browser and selects a given report database you have created already with LayoutView#create_rdb.

    Is this helpful?

    Matthias

  • That's it! Thanks - although feeling a bit silly for missing that in the documentation...

  • No worries ... you're welcome :-)

Sign In or Register to comment.