Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Using HECRAS Controller in csharp #13583
    iamchriskelley
    Participant

    Okay, got it! The following code is working in C# (with a reference to the HECRASController):

    hrc = new HECRASController();
    int nmsg = 0;
    bool block = true;
    Array sa = null;
    hrc.Project_Open(“[path]”);
    hrc.Compute_ShowComputationWindow();

    try
    {
    hrc.Compute_CurrentPlan(ref nmsg, ref sa, ref block);
    }
    catch (Exception e)
    {
    Console.WriteLine(e.ToString());
    }
    hrc.Project_Save();
    hrc.Project_Close();
    hrc.QuitRas();

    The System.Array has to be nulled for Compute_CurrentPlan() to accept it (confirmed by Caleb Buahin who wrote the RCAFF application in C#).

    in reply to: Using HECRAS Controller in csharp #13582
    iamchriskelley
    Participant

    Thanks for the reply, Chris. I’ll keep plugging away. If anyone has any suggestions please let me know.

Viewing 2 posts - 1 through 2 (of 2 total)