1

I am attempting to invoke HMS to run headlessly by prompting a batch file containing the following:

cd C:\Program Files\HEC\HEC-HMS\4.4
hec-hms -s C:\Users\abudhabikid\Desktop\TESTING\Project\BasinName_batch.script

The script itself contains the following:

OpenProject("Project", "C:\Users\abudhabikid\Desktop\TESTING\Project")
Compute("Run_Title")
Save
Exit(1)

These files are created in accordance to the section in the HMS manual regarding command line operation.

However, when my code invokes the script (or if I run the script myself through the command line, I receive the following error:

Error Upon Running HMS in Headless Mode

Note that this does not occur every single time that the script is run and I cannot tell that there is any pattern.

My requirements are that HMS run multiple times to satisfy a loop and I can't have users sitting at their desks clicking "OK".

I can see three directions here:

  1. There's some additional code I should put in the .script that tells HMS to OpenProject and Compute and so-on
  2. There's some code I can add to my VBA program to listen for this error message window and close it automatically
  3. There's some edits to the .config file I need to make (possibly regarding the java.exe and javaw.exe paths); I have played around with this to no avail and I'd really rather not have to edit every user's .config file before they could use my program
  4. (Bonus) Maybe I should limit users to a certain version of HMS?

I really hope somebody knows what do to here.

1
  • FOR THOSE WHO ALSO MIGHT WANT AN ANSWER: This issue seems to have been fixed in HEC-HMS version 4.6 (and presumably up). They're using a newer version of the JRE. Sep 28, 2020 at 19:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.