How to changing the library name of GDS by Ruby Script

edited March 2014 in Ruby Scripting
Dear All,

I would like to know what command can change the name of the library name in the ruby script, because what I save have the same library name "LIB".

Looking for your reply.

Thanks very much

Aaron

Comments

  • edited November -1
    Can I save a GDS file with a different library name for example "waveguide" but not “LIB”
  • edited March 2014

    Hi Aaron,

    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)
    

    Matthias

  • edited November -1
    I really appreciate your help, Matthias
  • edited November -1

    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

  • edited April 2016

    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

  • edited November -1

    Hi Matthias,

    I don't want to change it. I just want to read it. Is the metadata available as read-only?

    thank you.

  • edited November -1

    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

Sign In or Register to comment.