the solution is the two-argument version of "Layout#write" which takes a SaveLayoutOptions object:
layout = ... # a RBA::Layout with your data
opt = RBA::SaveLayoutOptions::new
opt.gds2_libname = "waveguide"
opt.format = "GDS2"
layout.write("myfile.gds", opt)
When I open a GDS, and check the File > Layout Statistics, I see "Library name: mentor.db", for example. Is there a way to access this in the script (presumably yes, since this GUI has this information). I note that the Layout object has "dbu", which is in this GUI, but I can't find the Library name.
the library name is part of the layout's "metadata". Metadata are additional pieces of information that the reader delivers and is kept along with the geometrical data, but it cannot be changed currently.
If you want to give a GDS file a specific library name you have to set the library name in the writer options.
the discussion title says "How to changing the library name ..." :-)
But sorry, the "meta data" is rather hidden currently. So you cannot read it through script now. It's on my TODO list, but this will require some refactoring.
Comments
Hi Aaron,
the solution is the two-argument version of "Layout#write" which takes a SaveLayoutOptions object:
Matthias
Related question.
When I open a GDS, and check the File > Layout Statistics, I see "Library name: mentor.db", for example. Is there a way to access this in the script (presumably yes, since this GUI has this information). I note that the Layout object has "dbu", which is in this GUI, but I can't find the Library name.
thank you
Lukas
Hi Lukas,
the library name is part of the layout's "metadata". Metadata are additional pieces of information that the reader delivers and is kept along with the geometrical data, but it cannot be changed currently.
If you want to give a GDS file a specific library name you have to set the library name in the writer options.
Matthias
Hi Matthias,
I don't want to change it. I just want to read it. Is the metadata available as read-only?
thank you.
Hi Lukas,
the discussion title says "How to changing the library name ..." :-)
But sorry, the "meta data" is rather hidden currently. So you cannot read it through script now. It's on my TODO list, but this will require some refactoring.
Matthias