Welcome to the RAS Solution Forums HECRAS Controller sub MonteCarloNValues()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8234
    Anonymous
    Guest

    Hi everyone,
    I am not expert (at all) of VBA and therefore my question is simple.

    I am trying to replicate the Monte Carlo code example which is in the book of Chris Goodell, but when i try to run the routine, the following message pops up:

    “Compile error: User-defined type not defined”

    and the following two code lines gets highlighted:

    yellow highlighted : Sub MonteCarsloNValues()

    blue highlighted: Dim typGeom As mSamples.TypeRasGeom

    I know there is some VBA reference to turn on but which one?

    Also, is it possible to adapt this code to a 2D simulation?

    Thank you

    #13612
    Anonymous
    Guest

    I managed to solve the issue of typGeom As mSamples.TypeRasGeom thanks to the “errata sheet” of Chris and adding the module for TypeRasGeom.

    I now have an issue with this part of the code:

    Dim typGeom As TypeRASGeom
    Dim blnGotIt As Boolean
    blnGotIt = GetRiversReachesNodes(typRASGeometry, RC)

    The problem is that GetRiversReachesNodes is not an existing Function.

    How does it works?

    #13613
    Chris G.
    Keymaster

    Nic- the function GetRiversReachesNodes is one I wrote myself. It is in the book on page 84.
    Thanks for buying my book. Hope you are finding it useful!

    -Chris

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