ArcHydro doesn't output to shapefile

8758
12
01-26-2012 08:36 AM
Labels (1)
StacieWolny
New Contributor II
Hi, all -

I just spent way too much time debugging something that I probably should have known, so wanted to post it here in case it saves someone else time.

In a nutshell, ArcHydro does not output to shapefiles, only geodatabases.  And if you specify a shapefile as the output to something like Batch Watershed Delineation, you get an error like this:

System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
   at ESRI.APWR.ApHydro.GDBHelper.AddFieldGP(ApLayer apLayer, String fieldTag, String& exMessage) in C:\Projects\10_Final\ArcHydroTools\src\ApHydro\GDBHelper.vb:line 1307

I love ArcHydro, but do wish that the error messages were more user-friendly.

~ Stacie
Tags (2)
0 Kudos
12 Replies
TanyaCamacho
New Contributor
"System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
at ESRI.APWR.ApHydro.GDBHelper.AddFieldGP(ApLayer apLayer, String fieldTag, String& exMessage) in C:\Projects\10_Final\ArcHydroTools\src\ApHydro\GDBHelper.vb:line 1307"

How did you resolve the error above?  I've completed the steps outlined by Mark Boucher in addition to running a Registry Editor.  My target locations (set through ArcToolbox and in ApUtilities) are pathed to a personal geodatabase for vector, and a project folder for raster.  I'm unsure why it's prompting an export to shapefile if I've given a database path.  Perhaps there's something I'm overlooking.

Any help would be GREATLY appreciated.  Thanks!
0 Kudos
StacieWolny
New Contributor II
I resolved the error by specifying a geodatabase layer as the output instead of a shapefile.  Using Arc 10 and ArcHydro 2, run the commands from ArcToolbox.  The output filename should look something like this:

D:\GIS\Ecuador\ecuador_w74.gdb\Layers\AdjointCatchment

not this:

D:\GIS\Ecuador\output\AdjointCatchment.shp

That's all I had to do...

~ Stacie
0 Kudos
TanyaCamacho
New Contributor
I tried to run the process from ArcToolbox, (using ArcHydro V.2.1.0.27 on a Windows 7, SP2 machine), but I received the following error.   

"System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
   at ESRI.APWR.ApHydro.ArcHydroOp.SinkEvaluation(ApLayers apLayers, Double zUnitFactor, Int32 debug, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage) in C:\Builds\HydroSolutions\10.0_ArcHydro\Sources\ArcHydroTools\src\ApHydro\ArcHydroOp.vb:line 6337
Failed to execute (SinkEvaluation)."

Thanks for your help.  I'm going to try running out of ArcToolbox w/an older version of ArcHydro 2 and see if it runs successfully.
0 Kudos
MarkBoucher
Occasional Contributor III
I've been getting these types of errors also. Specifically, when I try to create fdr, str, strlnk, etc.

When I refresh the Catalog, the rasters are there! When I pull them in to my mxd, they appear to be OK. Maybe the error I'm getting is some after-the-fact function that has nothing to do with creating those rasters. Maybe the routine tries to add them to the mxd and something goes wrong with something related to the filesnames and it can't, and so it reports the error...  This makes the model builder models crash, but I can do it all manually... at least.
EllenFehrs
New Contributor III

I've been getting the error

"System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

at ESRI.ArcGIS.Geoprocessing.GPUtilitiesClass.IGPUtilities2_OpenFeatureClassFromString(String catalogPath)
at ESRI.APWR.ArcHydroGPTools.AHHydroNetworkGeneration.Execute(IArray paramvalues, ITrackCancel trackcancel, IGPEnvironmentManager envMgr, IGPMessages message) in C:\Builds\HydroSolutions\10.4_ArcHydro\Sources\ArcHydroTools\src\ArcHydroGPTools\AHHydroNetworkGeneration.vb:line 511
Failed to execute (Hydro Network Generation)."

when my ModelBuilder gets to the Hydro Network Generation step, but it is still very clearly generating all the networks and associated edges/junctions. I checked the attribute tables, everything looks good. So, same issue, I have no idea why I get this error message in my processing dialog box. My ModelBuilder doesn't crash or anything, I just get this error returned every time it swings around to the Hydro Network Generation step. Arc Hydro just likes to make life difficult, I guess.

0 Kudos
EmilyMcCoy
New Contributor
I've been getting these types of errors also. Specifically, when I try to create fdr, str, strlnk, etc.

When I refresh the Catalog, the rasters are there! When I pull them in to my mxd, they appear to be OK. Maybe the error I'm getting is some after-the-fact function that has nothing to do with creating those rasters. Maybe the routine tries to add them to the mxd and something goes wrong with something related to the filesnames and it can't, and so it reports the error...  This makes the model builder models crash, but I can do it all manually... at least.


I have been pulling my hair out with this error message as well (below) and found that the data had been created, just not automatically added to the map. Thanks for the help!

""System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
at ESRI.APWR.ApHydro.ArcHydroOp.SinkEvaluation(ApLayers apLayers, Double zUnitFactor, Int32 debug, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage) in C:\Builds\HydroSolutions\10.0_ArcHydro\Sources\ArcHydroTools\src\ApHydro\ArcHydroOp.vb:line 6337
Failed to execute (SinkEvaluation)."
0 Kudos
MarkBoucher
Occasional Contributor III
Another possible solution is to change your setting using

"AdvancedArcMapSettings.exe" registry editor - typically stored in the C:\Program Files\ArcGIS\Desktop10.0\Utilities folder. My settings are shown below in the image.

[ATTACH=CONFIG]14865[/ATTACH]



I attribute this finding the help I received via this thread that I started:

http://forums.arcgis.com/threads/55419-CPU-speed-and-Memory-requirements-for-ArcHydro-and-Geoprocess...

0 Kudos
MarkBoucher
Occasional Contributor III
I found under the menu "Customize>ArcMap Options>Raster Tab>Raster Dataset subtab - Max Number of Unique Values to Render" has the same number I put into the "AdvancedArcMapSettings.exe" interface. As a matter of fact, it appears to be the same variable and either interface changes the same value.
0 Kudos
OyunkhuuGombo
New Contributor
HI. pls help me .
I tried to run the process from ArcToolbox, (using ArcHydro V.2.1.0.27 on a Windows 7, SP2 machine), but I received the following error. when I using hydro tools , this error go on . (always) 

"System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
at ESRI.APWR.ApHydro.ArcHydroOp.SinkEvaluation(ApLayers apLayers, Double zUnitFactor, Int32 debug, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage) in C:\Builds\HydroSolutions\10.0_ArcHydro\Sources\ArcHydroTools\src\ApHydro\ArcHydroOp.vb:line 6337
Failed to execute (SinkEvaluation)."

Thanks for your help. I'm going to try running out of ArcToolbox w/an older version of ArcHydro 2 and see if it runs successfully.

~ Stacie
0 Kudos