Script to import multiple layouts, specify layers to keep and transformations to apply for each file

Hey folks,

Sorry again for another basic scripting question.

I have a list of layout files. I want to start with a blank layout, then loop through each file, import only specific layers from each, and apply specific transformations to each so that at the end I've got my desired layers in one layout file and in the correct coordinate system.

Any suggestions or existing utilities that might accomplish this task?

Thanks,
Scott

Comments

  • Hi Scott,

    You can try this DRC script:

    # files, layer, datatype
    [ [ "a.gds", 1, 0 ],
      [ "b.gds", 2, 0 ],
    ..
    ].each do |file,layer,datatype|
      source(file)
      input(layer, datatype).output(layer, datatype)
    end
    

    However, this script will flatten your layouts.

    Matthias

  • Thank you Matthias!

Sign In or Register to comment.