Welcome to the RAS Solution Forums HECRAS Controller MS Office Excel is waiting for another application to complete an OLE action

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8195
    Anonymous
    Guest

    While writing some HECRAS Controller code in Visual Basic for Applications (to open HEC-RAS, run a steady flow file with multiple maps stored to disk via RAS mapper, and close HEC-RAS), I came across the following message:

    “MS Office Excel is waiting for another application to complete an OLE action”

    The pop-up on the OLE action stopped the process from running to completion, which was a problem as the code was to be for an automated process where I wouldn’t be sitting at the computer.

    It always occurred about the same time in the process (about 2 minutes into saving maps in RAS Mapper). If you were near the computer you could hit “OK” and the message would go away and the process would complete.

    Didn’t seem to be a problem with HEC-RAS, but almost like visual basic thought HEC-RAS was not working properly when it was waiting for maps to be stored to the disk.

    My workaround was to use the “Application.DisplayAlerts = False” code in Visual basic to suppress the message and have the process run without me being there. Not a perfect solution – but for this current project it works!

    Wondering if anyone else has ever encountered a similar message?
    – Rich

    #13543
    Anonymous
    Guest

    I encountered the same problem and seems like writing the additional like to disable display alerts is the only available solution. Doesn’t affect the way the code runs in any way. so seems like a good solution

    #13544
    tstephe9
    Participant

    Hi Rich,

    Thanks for the valuable insight. I was wondering how you were saving your maps to disk. Are you doing this manually, or is it applied in your code somewhere?

    I am running HECRAS via the Controller and VBA for multiple simulations. I was hoping there was a method to save the maps to disk or extract the water surface extents with each simulation.

    Thanks.

    #13545
    Anonymous
    Guest

    So in RASMapper, I chose the option to save the output on disk in “Edit Map Parameters” . Then saved the plan file and ran it in controller.

    #18345
    Chris Goodell
    Participant

    Rich-thanks for that tip (I realize I’m about 7 years late to this party)! 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.