Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthordev_2011
    • CommentTimeAug 11th 2011
    Hallo klayout-team and co.,

    I use Klayout 0.21.12 with Windows 7 32 Bit and I don't get any message on the command line.
    Also klayout.exe -h doesn't run. Is this problem when using windows a known one?
    On unix everything works fine.

    with best regards dev_2011
    • CommentAuthorMatthias
    • CommentTimeAug 11th 2011 edited


    klayout.exe is compiled as a Windows application, not as console application. I guess that is why there is no output.

    Instead, you can use the log viewer (File/Log Viewer) to look at the output. The output is basically mirrored there. "klayout -h" is not available there which I admit is an undesired side effect.

    Here is the output of klayout -h:

      -c <config file>    Use this configuration file
      -d <debug level>    Set debug level
      -e                  Editable mode (allow editing of files)
      -ne                 Readonly mode (editing of files is disabled)
      -gr <file name>     Record GUI test file
      -gp <file name>     Replay GUI test file
      -gb <line number>   Replay GUI test file up to (including) line
      -gx <millisec>      Replay rate for GUI test file
      -gi                 Incremental logs for GUI test file
      -i                  Disable undo buffering (less memory requirements)
      -ni                 Enable undo buffering (default, overrides previous -i option)
      -l <lyp file>       Use layer properties file
      -lx                 With -l: add other layers as well
      -lf                 With -l: use the lyp file as it is (no expansion to multiple layouts)
      -m <database file>  Load RDB (report database) file (into previous layout view)
      -p <plugin>         Load the plugin (can be used multiple times)
      -r <script>         Execute ruby main script on startup (after having loaded files etc.)
      -rm <script>        Execute ruby module on startup (can be used multiple times)
      -rd <name>=<value>  Specify ruby variable
      -rx                 Ignore global rbainit file (test mode)
      -s                  Load files into same view
      -t                  Don't update the configuration file on exit
      -u <file name>      Restore session from given file
      -v                  Print program version and exit
      -x                  Synchronous drawing mode
      -z                  Non-GUI mode

    Best regards,



    Hi Matthias,

    I am trying to understand/debug some behaviour when I start KLayout on the command line using the -zz option for batch-processing. This is the command:

    klayout_app.exe -zz -rd input=original.gds -rd output=fixed.gds -r ./layerfix.rb

    Here are my observations:

    • When starting directly from Windows' CMD, the call immediately returns while KLayout is still running in the background running the script.
    • When running the same command using MinGW's make utility (i.e. a Makefile), the call blocks until finished but also returns an error status code 1, but without any indication what went wrong.
    • When running the same command from within MinGW's make utility but without the -zz option, KLayout's main window shows up while the script is executing and it finishes with status code 0 (success).

    Now I do like the part where the call waits until the command completed, but I don't understand the difference in the error status when running with/without -zz. Also, in both cases, the script seems to actually complete successfully, the fixed.gds file is created and looks ok.

    Is there any way to run KLayout using the -zz option and looking at the stdout or stderr output of the program? That would actually be helpful for debugging scripts as well.

    Kind regards, Chris

    • CommentAuthorMatthias
    • CommentTimeAug 18th 2016 edited

    Hi Chris,

    Windows is entirely different from Linux - on Windows, a program needs to be compiled as a console application in order to show stdout or stderr on the screen. Being a GUI application, KLayout isn't. Which explains the behaviour.

    You'll need a special executable to do the kind of thing you want. Or move to Linux.