proc tclpropeval2: make global var sch_basename (schematic name with no extension) available to TCL expressions

This commit is contained in:
stefan schippers 2024-02-16 23:17:54 +01:00
parent b49d0bb13c
commit 876f26cb80
1 changed files with 2 additions and 1 deletions

View File

@ -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