From 876f26cb80e26020182a13650f8c1bde7275cc08 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 16 Feb 2024 23:17:54 +0100 Subject: [PATCH] proc tclpropeval2: make global var sch_basename (schematic name with no extension) available to TCL expressions --- src/xschem.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index b494d834..431d22b6 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -4494,13 +4494,14 @@ proc tclpropeval {s instname symname} { # this hook is called in translate() if whole string is contained in a tcleval(...) construct proc tclpropeval2 {s} { - global debug_tcleval env path debug_var + global debug_tcleval env path debug_var sch_basename set raw_level [xschem get raw_level] set netlist_type [xschem get netlist_type] # puts "tclpropeval2: s=|$s|" if {$debug_var <=-1} {puts "tclpropeval2: $s"} set path [string range [xschem get sch_path] 1 end] + set sch_basename [file rootname [xschem get current_name]] # skip hierarchy components above the level where raw file has been loaded. # node path names to look up in raw file begin from there. set skip 0