Index passed was not within the valid range error running Level DEM

3185
5
07-20-2016 11:31 AM
Labels (1)
JohnOlson3
New Contributor

When I try to run Level DEM on the San Marcos tutorial data I get the error message:

“Level DEM: System.Runtime.lnteropServices.COMException (Ox80040202): The index passed was not within the valid range. at ESRI.ArcGIS.Geodatabase.lFeature.set_ Value(lnt.32 Index, Object Value) at ESRI.APWR.ApHydro.ArcHydroOp.LevelDEM(ApLayers apLayers, lnt64 intFactor, String fillField, Double zUnitFactor, DoublefillElevOffse~ lnt.32 debug, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage) in C:\ Builds\HydroSolutions\ 10.3 ArcHydro\ Sources\ArcHydro Tools\ src\ApHydro\ArcHydroOp.vb:line 1002S”

I followed the inputs given in the tutorial (using elev_cm as Raw DEM, NHDWaterbody as Lake Poly, Fill Elevation set to “none”, and offset set to 0). I followed all of the usual ArcHydro conventions (placed data in a relatively short and direct path, started from a fresh map, bringing in the DEM first, etc.). I tried this on two machines, one running ArcGIS 10.1, the other running 10.3, each with a fresh install of the latest ArcHydro builds with the same result. DEM reconditioning works fine, but I was curious to how Level DEM would perform. Any hints on what I might have overlooked?

0 Kudos
5 Replies
CarrieLandgraf
New Contributor III

I am experiencing the same problem.  Did you ever find a resolution?  The interesting thing is that I initially ran the Level DEM function using an unprojected polygon layer.  A DEM was actually generated, but I received the warning that it didn't have a z unit factor.  This reminded me I needed to project the polygon layer.  I deleted the original output, retried the process with my projected polygon layer only to receive this same message.  Thank you!

0 Kudos
JohnOlson3
New Contributor

Nope, sorry I didn't figure this out. I just went on without it.

0 Kudos
CarrieLandgraf
New Contributor III

Thanks for responding.  I ended up importing my shapefile into a file geodatabase, and copied everything to my local desktop instead of trying to pull files and save files to a network location.  Then I populated a field (double) called LevelElev with the elevation of each lake's centroid (I used "Feature to Point" to create centroids and "Add Surface Information" to assign elevations to the centroids). I ran Level DEM again, and instead of selecting "None" for the Fill Elevation parameter, I selected the populated LevelElev field.  This resulted in a successful execution of the function (or at least I didn't receive any error messages and a LevelDEM was generated).

0 Kudos
ViktorGydemo
New Contributor

Was finally able to bypass this problem by using LevelDEM directly from ArcToolbox rather than going via toolbar. However, it only worked from the second attempt and on, using exactly the same files and settings. ...because ArcGIS logic.

Jon-PaulMcCool1
New Contributor II

I was able to get this to work first go around. I did notice that the desired output was in a folder that did not exist. If that is hard-coded somewhere in the process, that could be the issue.

0 Kudos