57 lines
1.5 KiB
XML
57 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<klayout-macro>
|
|
<description>Import Cadence Techfile</description>
|
|
<version/>
|
|
<category/>
|
|
<prolog/>
|
|
<epilog/>
|
|
<doc/>
|
|
<autorun>false</autorun>
|
|
<autorun-early>false</autorun-early>
|
|
<shortcut/>
|
|
<show-in-menu>true</show-in-menu>
|
|
<group-name/>
|
|
<menu-path>file_menu.load_layer_props+</menu-path>
|
|
<interpreter>ruby</interpreter>
|
|
<dsl-interpreter-name/>
|
|
<text>#
|
|
# 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
|
|
</text>
|
|
</klayout-macro>
|