Hello,
I have hundreds of .GDS files and I need to convert them to .DXF files. I can convert them one by one ( save a .GDS as .DXF ). But it would take quite a long time to convert all the .GDS. Is there any way to convert them at the same time (or faster)?
Comments
Hi
there is a discussion about a similar problem here: http://klayout.de/forum/comments.php?DiscussionID=195&page=1#Item_5. Another discussion covering that topic is http://klayout.de/forum/comments.php?DiscussionID=173.
The approach uses a simple script. You can easily extend the script to do the conversion on many files or you put the klayout call into a .bat or shell script.
Matthias
Thank you very much for your help! Your codes work great!
I have one more question, is there any way to set the "scale factor" during the conversion?
Regards,
Lunan
Hi Lunan,
yes there is. Instead of "ly.write" use the version with an option object:
You can configure more options on "SaveLayoutOptions", like the DXF file's unit etc. Please note that with this method, you'll have to configure the format option on "options" - the write method won't derive it from the file name. Just in case you want to write a different format.
Regards,
Matthias
Thanks a lot for your help! It works very well!
Lunan
Sometime there are more than one cell that is inclueded in a .gds file. Is there a way to select a certain cell (I know the cell name) using RBA? Then I could be able to automatically to convert the cell to .dxf (pretty much like the command "Save selected cells as"...)
Thanks!
Lunan