add new xschemrc global variable "load_file_postprocess" that might contain tcl commands to be executed whenever a new file is loaded.
This commit is contained in:
parent
8fe82cf4ce
commit
f5bd459082
|
|
@ -3669,6 +3669,7 @@ int load_schematic(int load_symbols, const char *fname, int reset_undo, int aler
|
|||
drc_check(-1);
|
||||
}
|
||||
my_free(_ALLOC_ID_, &ffname);
|
||||
if(reset_undo == 1) tcleval("eval_load_file_postprocess");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9636,6 +9636,15 @@ proc eval_netlist_postprocess {} {
|
|||
}
|
||||
}
|
||||
|
||||
proc eval_load_file_postprocess {} {
|
||||
global load_file_postprocess
|
||||
if {[info exists load_file_postprocess]} {
|
||||
if {[catch {uplevel #0 $load_file_postprocess} res]} {
|
||||
puts "executing $load_file_postprocess:\n\n$res"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc setup_tcp_xschem { {port_number {}} } {
|
||||
global xschem_listen_port xschem_server_getdata
|
||||
|
||||
|
|
|
|||
|
|
@ -573,8 +573,15 @@
|
|||
###########################################################################
|
||||
#### TCL COMMANDS TO BE EXECUTED AFTER GENERATING NETLIST
|
||||
###########################################################################
|
||||
#### default: not set.
|
||||
# set netlist_postprocess {textfile $netlist_dir/[xschem get netlist_name fallback]}
|
||||
|
||||
###########################################################################
|
||||
#### TCL COMMANDS TO BE EXECUTED AFTER LOADING A NEW FILE
|
||||
###########################################################################
|
||||
#### default: not set.
|
||||
# set load_file_postprocess {puts [xschem get schname]}
|
||||
|
||||
###########################################################################
|
||||
#### WEB URL DOWNLOAD HELPER APPLICATION
|
||||
###########################################################################
|
||||
|
|
|
|||
Loading…
Reference in New Issue