Scripting

Accessing the Main Program Window

Situations arise that necessitate accessing the main HEC-DSSVue program window.  Examples of such situations are:

 

§  Having a script determine whether it is running in an interactive mode or without a graphical display.

§  Having a script gather information about interactively-selected pathnames and time windows for automated processing.

§  Having a script launch the interactive graphical editor.

 

The ListSelection class in the hec.dssgui module facilitates these activities.  An import statement of the form “from hec.dssgui import ListSelection” is necessary to use the ListSelection class.  (For CWMS-VUE, the import statement is “from hec.cwmsVue import CwmsListSelection”.)

 

If the script is not running in a mode without a graphical display (i.e. the HEC-DSSVue was launched with the script as a parameter) then a main program window will not exist.  If the script needs to have the user utilize the graphical editor, the script will need to create a main program window for the duration of the graphical edit session.

 

More:

ListSelection Class

DataReference Class