@Stefan Schippers is there a limit in how long I can write a TCL command? When I run a big command it says it's missing brackets and the command lines are incomplete.
s
Stefan Schippers
03/10/2023, 10:48 PM
If there is any line length limit it is quite large. For long commands be careful to balance all the brackets and quoting characters.
b
Bruno de Melo Costa
03/11/2023, 6:52 AM
It seems it's not large enough... 🤔. I wrote a 150 lines code to run on tcl_command and it only read about 120 lines
Bruno de Melo Costa
03/11/2023, 6:52 AM
Btw, is there a way to automatically run a script when a schematic is open?
s
Stefan Schippers
03/12/2023, 11:01 AM
For big commands write a tcl procedure:
create a file
script.tcl
, write the procedure in it:
Copy code
proc my_procedure {param1 param2} {
puts "param1 is: $param1"
puts "param2 is: $param2"
}
##optional: execute the procedure
my_procedure aaaa bbbb
Then at the xschem prompt source the file:
source script.tcl
If you want to source the script.tcl automatically when xschem is opened add this line in your xschemrc:
lappend tcl_files /path/to/your/script.tcl
Stefan Schippers
03/12/2023, 11:03 AM
You can also specify the script file on command line:
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.