AnsweredAssumed Answered

Different behavior when I run geoprocessing tool from SDK and from ArcDesktop ModelBuilder

Question asked by asoft99 on Feb 20, 2019
Latest reply on May 30, 2019 by mkohlerpsl

I have a large JSON file which I download from ArcGIS Server REST (size is 140MB). When I try to execute the JSONToFeatures Geoprocessing tool on this file I get an error.

I have the method below which I call from various parts of my solution to run various geoprocessing tools. (in this case I call below method with arguments toolName="JSONToFeatures", a path for input json and a path for output SHP file).

    private object RunTool(string toolName, object[] parameters) {         IVariantArray gpParams = new VarArrayClass();         IGeoProcessorResult gpResult = new GeoProcessorResult();         foreach (object o in parameters)             gpParams.Add(o);         object rev = new object();         try {             gpResult = Geoprocessor.Execute(toolName, gpParams, null);             return gpResult.ReturnValue;         }          catch (COMException comEx) {             throw new Exception(Geoprocessor.GetMessages(ref rev), comEx);         }          finally {             ReleaseObjects(new object[] { gpParams, gpResult });         }     }

When executed returns the following error: Executing: JSONToFeatures input_path output_path Start Time: Thu Jan 31 14:32:43 2019 ERROR 999998: Unexpected Error. Failed to execute (JSONToFeatures). Failed at Thu Jan 31 14:32:45 2019 (Elapsed Time: 1,48 seconds)

When I execute JSONToFeatures tool from within ArcDesktop ModelBuilder execution proceeds successfully.

Please note that on small files of size 1-10 MB (which is the normal size of files processed by the code above) there are no problems.

How can I proceed with this?

Outcomes