Running in Batch
Mode
To run a script in Batch Mode, you give HEC-DSSVue the file name of the script following
the program name; for example:
HEC-DSSVue.exe C:/HecDSSVueDev/HecDssVue/scripts/Oakville.py
In Windows, this can be passed through a .bat file and then you can run that .bat file; e.g.,
RunOakville.bat:
HEC-DSSVue.exe C:/HecDSSVueDev/HecDssVue/scripts/Oakville.py
Or you can make a shortcut (copy the HEC-DSSVue shortcut) and pass the script file name in following the Target in the shortcuts Properties dialog. Right click on the original HEC-DSSVue shortcut on the desktop and select Copy. Right click on an empty area on the desktop and select Paste. Right-click on the copy and Rename to an appropriate name (.e.g., your script name), right click again and select Properties. Enter the script name following the program name in the Target area, as shown below.
Properties Window
In Unix, a file is made executable by changing its mode to be executable, e.g.:
RunOakville:
HEC-DSSVue C:/HecDSSVueDev/HecDssVue/scripts/Oakville.py
Chmod 555 RunOakville
At the end of a batch script using ListSelection, you should close DSS files and exit the ListSelection program using the finish() function. This function properly shuts down the program without altering any properties. For example:
ls = ListSelection.getMainWindow()
…
ls.finish()
Don’t call finish() when running interactively (unless you want the program to terminate).