Within a python script I am editing the unsteady flow file, calling the RAS api, and then exporting the results of interest, but my RAS window is being closed before it has time to complete a simulation. I have included the portion of code of interest below.
import win32com.client
hec = win32com.client.Dispatch(‘RAS630.HECRASController’)
hec.Project_Open(r”file path”)
hec.ShowRAS()
hec.Compute_CurrentPlan()
hec.QuitRAS()
I have come across the option to use time.sleep(# seconds), which works, but I anticipate some of my runs to take longer. Has anyone come across this and found a way to resolve it?