I would like to give me your advice about using cadence orcad so I can run sequentially cir or net(netlist) files with pspice.exe in cmd of my pc.
I use tcl/tk language.I have tried a few things without any results.
I want to make something similar to this one:
set top {C:\Users\file1.net C:\Users\file2.net};
foreach a $top
{exec D:\\tools\\bin\\pspice.exe -r $a}
There are two problems in your code. The first problem is that
\f
is an escape character sequence in lists (for “go down one line”, IIRC; point is you don't want that interpretation). The second problem is that you've got your brace placement wrong in yourforeach
.The first problem is best addressed by using
/
instead of\
, and then usingfile nativename
on the value fed to the OS. (You have to do that manually for argument to executables inexpr
; Tcl can't fix that for you entirely automatically.) The second problem is just a syntax error.Try this: