Open specified gds layer/data type via Python

edited November 2015 in Ruby Scripting
Can we open a gds layer (or multiple gds layers) via python script in Macros? Thanks for the help

Comments

  • edited November -1

    Hi Frings,

    what do you want to do exactly? Open it for viewing or manipulation?

    There is a introduction into the scripting feature here: http://www.klayout.de/doc/programming/index.html. It's mainly for Ruby but there is a section about how to translate Ruby to Python.

    Matthias

  • edited November -1
    Hi Matthias,

    I am new to Klayout and I would like to open multiple gds layers at a time for reviewing, I will check the materials first, thanks for the help.
  • edited November -1
    Hi Matthias,

    For example, I have some gds files, 1.gds, 2.gds, 3.gds...., I would like to use python/ruby script to open 1:0 of 1.gds, 2:0 of 2.gds and 3: 0, 4:0 of 3.gds in the same panel at a time, it is better I can change the layer description from 1:0 to, for example, "Target", any suggestion to doing so? Thanks a lot for you help
  • edited November -1

    Hi Frings,

    I don't think you'll need scripting.

    Just try

    klayout -s 1.gds 2.gds 3.gds ...
    

    then edit the layer list using the functions from the layer list's context menu (delete, rename ..) and save the resulting layer properties to a .lyp file with File/Save layer properties.

    Matthias

Sign In or Register to comment.