call reload from command line

Is there a way to reload a file from the command line?

I am changing a gds using another scripting. But I use klayout for visualization, generally I have to reload manually. If there was a command line interface it would be reasonably language agnostic.

Comments

  • edited January 2013

    Hallo,

    once the KLayout process is started there are not many ways to interact with the process by means of a script currently. That is because there are no built-in interfaces that allow external processes (such as the shell) to trigger actions on the KLayout process.

    A possible solution is to use a Ruby script that opens a TCP/IP port and listens to connection attempts. In case of a connection it could trigger a reload by calling the respective function. You could can then use some client application such as "wget" to trigger that action. A template for that purpose is the Ruby sample Transforming KLayout into a HTTP server.

    Another alternative is to create a Ruby script that runs a timer which periodically checks for time stamp changes on the files loaded. But that requires some synchonisation: if the file is not finished yet, the script must not try to reload.

    Regards,

    Matthias

Sign In or Register to comment.