Set global grid

edited January 2014 in Ruby Scripting

With this you can get the global grid:
http://www.klayout.de/doc/code/class_MainWindow.html#m_grid_micron

Is there a way to SET the global grid, in Ruby script?

Thanks.

Comments

  • edited February 2014

    Hi David,

    yes there is, although not directly:

    RBA::Application::instance.set_config("grid-micron", 0.1.to_s)
    

    The set_config method is pretty generic. You can basically set every parameter that is stored in the configuration file (you'll find it under ~/.klayout/klayoutrc on Linux for example). That includes many features like background color or display properties. The second parameter has to be a string, hence the "to_s" method on the grid value (0.1 micron).

    The set_config method is also available for LayoutView. That allows configuring views independently from others.

    Matthias

Sign In or Register to comment.