Predefined open klayout settings

edited April 2014 in Ruby Scripting
Hello,
Is it possible with some ruby script klayout to be opened with following predefined settings:

Editor mode
Full screen
Background color: black
Display = Full Hierarchy

tyanata

Comments

  • edited April 2014

    You tyanata,

    you can configure all of that in the Setup menu. The configuration is stored in a file called klayoutrc in KLayouts home folder (on Windows typically in a folder called "KLayout" in your home directory, on Linux in ~/.klayout). You can copy away that file - for example in "someplace/myconfig" and run KLayout to use that configuration plus edit mode:

    klayout -e -c someplace/myconfig
    

    If you add the -t option, the configuration file will not be updated when the program is closed. That way, settings made in the setup dialog will become temporary. Please see "klayout -h" for a list of all options available.

    You can make KLayout to use a specific configuration initially (for example, if you're are maintainer of a company-wide installation). To achieve this, copy the "klayoutrc" file to the place where the klayout binary is located. If KLayout finds a file with that name in it's installation path, it will initialize itself with these settings on the first call.

    You can script that settings too, but I feel that the configuration file approach is easier to use.

    Matthias

  • edited November -1
    Hello Matthias,

    Yes I am maintainer of a company-wide installation, I already found the approach with "klayoutrc" file.

    I already made "klayoutrc" file to set background and start in editor mode:

    <?xml version="1.0" encoding="utf-8"?>
    <config>
    <background-color>#000000</background-color>
    <edit-mode>true</edit-mode>
    </config>

    But could not find how to predefine it to start in Full screen and Display = Full Hierarchy.

    tyanata
  • edited April 2014

    Hi Tyanata,

    the window geometry including full-screen mode is encoded in

    <window-geometry>...</window-geometry>
    <window-state>...</window-state>
    

    But the value is some binary string that Qt uses internally to store the window state. If you close KLayout in full-screen mode, it will write the corresponding state and geometry you can copy that values over to your default setup.

    <full-hierarchy-new-cell>true</full-hierarchy-new-cell>
    

    will select full hierarchy on loading.

    Matthias

  • edited November -1
    Thanks Matthias,

    The approach is working.

    tyanata
Sign In or Register to comment.