From e8b7714ecaf4118d1eb83e0e6302d8844158ac73 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Mon, 19 Sep 2022 12:54:56 +0200 Subject: [PATCH] fixes in ngspice_backannotate.tcl to work with Xyce as well as ngspice --- src/ngspice_backannotate.tcl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ngspice_backannotate.tcl b/src/ngspice_backannotate.tcl index f851a7e7..9baa3161 100644 --- a/src/ngspice_backannotate.tcl +++ b/src/ngspice_backannotate.tcl @@ -115,12 +115,13 @@ proc ngspice::get_current {n} { set prefix [string range $n 0 0] set path [string range [xschem get sch_path] 1 end] set n $path$n - if { $path ne {} } { + if { ![sim_is_xyce] && $path ne {} } { set n $prefix.$n + if { ![regexp $prefix {[ve]}] } { + set n @$n + } } - if { ![regexp $prefix {[ve]}] } { - set n @$n - } + puts "get_current: $n" set n i($n) # if { [regexp {\[} $n] } { set n \{$n\} } # puts "ngspice::get_current --> $n"