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
"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."
I am also encountering this problem now, but the two links in the answer are invalid.
I sometimes have a need to go the opposite direction,
like taking packaging house cavity drawings in to the
layout for making bond figures.
@wildwolfcj The forum links changed from "DiscussionID=xyz" to "https://www.klayout.de/forum/discussion/xyz". So these links should lead you further: https://www.klayout.de/forum/discussion/195 and https://www.klayout.de/forum/discussion/173. They date back to 2012 however.
Matthias
New to GDS. Customers provide them most of the time the GDS needs to be converted to DXF 100% error rate top-level cell is not unique. Is there a quick easy method to avoid error? Sitting here viewing a GDS file with 45 cells. 1 is bold all uppercase. Is there a way to move everything to 1 cell. Don't care about intention etc. as long as marking are .0005 microns within positional tolerance.