how to read other file in drc deck

Hi @Matthias,

May I know how to read file in drc deck, for example, I defined layers in a file, then in the main drc deck, i directly read the layer file, no need define again. Or create a drc deck with some common rules, then in other deck, i directly ready the file, no need define those rules again.
I find using following commands does not work.
file=File.open("layer_filename")
file_data=file.readlines
file.close

Thank you very much!

Comments

  • @TryAndTry DRC decks are basically Ruby code. Layer are only Ruby variables.

    You can basically use Ruby features to organize your code (classes, procedures etc.). But as this needs some level of planning beyond linear code, I have created a lean feature to include other files without caring for namespace isolation etc. You can find the details here: https://www.klayout.de/doc-qt5/manual/drc_runsets.html#h2-72

    Matthias

Sign In or Register to comment.