As you probably don't want to write a special script for every file, you can pass the input layout's name and the report file name by defining variables with the "-rd name=value" option:
After ran the batch mode with the command : klayout -b -r test.lydrc
I've got the ERROR message, while test.lydrc run in GUI perfectly. Does anyone know what happen. Thanks.
Comments
Maybe you have an answer from that discussion :
https://www.klayout.de/forum/discussion/comment/4953
Laurent
Because this question is asked quite often ... Here is the idea:
You can basically run a DRC script in batch mode this way:
In the script you need to tell KLayout where to read the layout from and where to write the report:
As you probably don't want to write a special script for every file, you can pass the input layout's name and the report file name by defining variables with the "-rd name=value" option:
In the script you refer to these variables with "$input" and "$report":
Finally, if you want you script to be useful in GUI and batch mode you can put in an "if" which takes these variables only if set on the command line:
Matthias
Thanks Matthias, Very clear and useful comment.
After ran the batch mode with the command : klayout -b -r test.lydrc
I've got the ERROR message, while test.lydrc run in GUI perfectly. Does anyone know what happen. Thanks.
You shouldn't call the file ".lydrc". This suffix is reserved for XML-style scripts.
".drc" is the right suffix for plain text files.
Matthias
Got it. Just try to rename and run. It's work now. Many Thanks Matthias