Executing Scripts
HEC-DSSVue allows the execution of scripts in interactive and batch modes. Scripts
are executed interactively by starting the HEC-DSSVue program and selecting the desired
script from the Toolbar or the Script Selector from the Utilities menu.
Scripts are executed in batch mode by starting the HEC-DSSVue program with a script file
name as a parameter (e.g. HEC-DSSVue.exe c:\test\myScript.py). Scripts can be
launched from the HEC-DSSVue program from the Script Menu, or from the
Toolbar or from the Script Selector.
Interactive scripts are not passed any parameters upon script execution. In a
script executed interactively the variable sys.argv is a list of length 1, with the only
element set to the empty string (e.g. sys.argv = [“”]).
Scripts executed in batch mode may take parameters from the command line (e.g.
HEC-DSSVue.exe c:\test\myScript.py a b c). In a script executed in batch mode the
variable sys.argv is a list whose length is one greater than the number of parameters
passed on the command line, with the first element set to the file name of the executing
script and the remaining elements set to the parameters (e.g. sys.argv =
[“c:\\test\\myScript.py”, “a”, “b”, “c”]).
More: