GDStxt to GDS

Hi there,

I would like to draw multiple shapes for my layout. For example, Grids with buses inductors and so on. I dropped by the ASCII generated by Klayout and understood its format. Then, using a scripting technique I generated my examples. However, the GDS is in txt format, so in order to transfer it to a binary one, I had to open Klayout and save it manually. is thre a way I can do this on the fly. it will be appreciated since I need to generate different shapes and layouts.

thanks in advance


  • Hi,

    KLayout comes with "buddy tools". Those are simple binaries that perform a single task. Yours is "strm2gds" which turns any known format into GDS. Use it like "strm2gds input.gdstxt output.gds".

    Unfortunately in the latest release 0.26, those tools are broken. I'll fix that with the next minor release. Until then you can use version 0.25.9.

    As a general remark, it's more efficient, safer and more generic to create layout inside KLayout using the scripting API. With this you can do a lot more than just generating simple pattern. For example, you have full access to the layout processing features of the RBA::Region class and you can use the built-in text field generator. You'll find some details here: and


  • Hi Matthias,

    thank you for your helpful comment. the binary works very efficiently. Also, I think you are right about using API and it would add more degree of freedom for my work.


Sign In or Register to comment.