Import Cadence Techfile false false true file_menu.load_layer_props+ ruby # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # LICENSE file for details. # # DESCRIPTION: Cadence techfile import for KLayout. # # The script will read a Cadence techfile [input] and convert # it to layer properties. # It will require a .drf file which must be located where [input] is found. It will also read # a .layermap file if there is one beside the [input] file. # It will prompt for a .drf file if it does not find a unique file. require "import_tf" module TechfileToKLayout app = RBA::Application.instance mw = app.main_window lv = mw.current_view if lv == nil raise "No view selected" end # Ask for the file name sel_tf_file = RBA::FileDialog.get_open_file_name("Select Cadence Techfile", ".", "Cadence techfiles (*.tf);;Text files (*.txt);;All files (*)") if sel_tf_file.has_value? begin lv.transaction("Import Cadence Techfile") import_techfile(lv, sel_tf_file.value) ensure lv.commit end end end