From 0af6155b5b969db50dd4f734d2e949d96330cd10 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 3 Jan 2025 11:43:00 +0100 Subject: [PATCH] add scripts.html manual page --- doc/xschem_man/scripts.html | 96 ++++++++++++++++++++++++++++++++++ doc/xschem_man/simulation.html | 2 +- 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 doc/xschem_man/scripts.html diff --git a/doc/xschem_man/scripts.html b/doc/xschem_man/scripts.html new file mode 100644 index 00000000..531dba39 --- /dev/null +++ b/doc/xschem_man/scripts.html @@ -0,0 +1,96 @@ + + + +SCRIPTS + + + + + + + +
+ + +UP + + +

XSCHEM SCRIPTS


+ +

+ Xschem is a tcl interpreter and as such TCL scripts and commands can be executed. + Xschem adds its own extension commands, mostly with the xschem TCL command. + See this manual page. + The same procedure as tcl is used to load and execute a script: +

     source /path/to/script.tcl
+

+

+ there are various ways to run a script in xschem: +

+
    +
  1. + On the xschem command prompt: +

    source myscript.tcl

    +
  2. + +
  3. + In the xschemrc you may set the tcl_files tcl variable with a list of files + to read in and execute after xschem is started: +

    set tcl_files {/path/to/file1.tcl  /path/to/file2.tcl}

    +
  4. + +
  5. + the postinit_commands variable in xschemrc can be filled with tcl code , + it is executed when starting xschem: +

    set postinit_commands {
    +  puts hello
    +  puts world
    +}
    +    

    +
  6. + +
  7. + On the unix shell command line with --tcl (this code is executed after reading xschemrc, + this is usually done to override xschemrc settings: +

    xschem --tcl 'set intuitive_interface 0'

    +
  8. + +
  9. + On the unix shell command line with --preinit. Same as --tcl, + but the commands are executed + at the very beginning of xschem startup, before reading xschemrc. + Usually done to change some internal variables for testing +

    xschem --preinit 'some_weird_tcl_code'

    +
  10. + +
  11. + On the unix shell command line with --command. + The specified tcl code is executed after complete startup so all extended + xschem commands are available: +

    +xschem solar_panel.sch --command 'simulate'  #there are other ways to do this, just an example
    +    

    +
  12. + +
  13. + + On the unix shell command line with --script. Specify a file to source, + it will be executed after complete startup. +

    xschem --script myscript.tcl

    +
  14. + +
+ + +
+
+ + +