AnsweredAssumed Answered

"Cannot add field [X] to [...]" Error in Geoprocessing

Question asked by kyanuk1 on Mar 11, 2013
Latest reply on Mar 18, 2013 by kyanuk1
Hello, back once more with a Geoprocessing object error ...

I am trying to perform a Getis-Ord analysis for one of my applications (written in C#), and I'm getting an error that I cannot add a field created from the analysis into the new feature class.  My code is the following:

            gp.AddToolbox(@"C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Spatial Statistics Tools.tbx");             IVariantArray parameters = new ESRI.ArcGIS.esriSystem.VarArrayClass();             parameters.Add(DatabaseUtils.ScratchDBPath + "\\" + inFeature);             parameters.Add(field);             parameters.Add(DatabaseUtils.FGDBPath + "\\" + outFeature);             parameters.Add("INVERSE_DISTANCE");             parameters.Add("EUCLIDEAN_DISTANCE");             parameters.Add("NONE");             parameters.Add(200);             try             {                 IGeoProcessorResult res = (IGeoProcessorResult)gp.Execute("HotSpots", parameters, null);             }             catch (System.AccessViolationException avEx) { avEx.emailError(gp); }             catch (System.IO.FileLoadException flEx) { flEx.emailError(gp); }             catch (Exception ex) { ex.emailError(gp); }             finally { gp = null; }


This is also in the error:

A column was specified that does not exist.
A column was specified that does not exist.
A locator with this name does not exist.
Failed to execute (HotSpots).


One thing to note is that I am deleting an existing feature class in an SDE database (programmatically), and creating a new one with the same name using the analysis ... I don't think this has anything to do with this, considering the feature class looks to be created, but the fields are not added.

Outcomes