<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Different behavior when I run geoprocessing tool from SDK and from ArcDesktop ModelBuilder in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638076#M17174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suggest you reformat your code as it is impossible to read! You set the format by going to the 3 dots &amp;gt; More option &amp;gt; Syntax highlighter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2019 12:20:36 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2019-03-25T12:20:36Z</dc:date>
    <item>
      <title>Different behavior when I run geoprocessing tool from SDK and from ArcDesktop ModelBuilder</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638075#M17173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;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.&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;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).&lt;/P&gt;&lt;PRE style="color: #242729; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;    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 });         }     }&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;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)&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;When I execute JSONToFeatures tool from within ArcDesktop ModelBuilder execution proceeds successfully.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;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.&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;How can I proceed with this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 10:49:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638075#M17173</guid>
      <dc:creator>AndreasAndreou</dc:creator>
      <dc:date>2019-02-20T10:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Different behavior when I run geoprocessing tool from SDK and from ArcDesktop ModelBuilder</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638076#M17174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suggest you reformat your code as it is impossible to read! You set the format by going to the 3 dots &amp;gt; More option &amp;gt; Syntax highlighter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 12:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638076#M17174</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2019-03-25T12:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Different behavior when I run geoprocessing tool from SDK and from ArcDesktop ModelBuilder</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638077#M17175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the tool name in the catalog window. I just spent more than a day trying to fix an issue calling a model from .net addin. Tech Support eventually walked through it with me. Ended up being the tool/model name was not as it seems. If you create a model in a toolbox and then change the name of the model by right clicking and choosing Rename, the model retains its original name. When calling the model from outside, the name is wrong and gives an error. Point is, if you rename a model, do it in the model builder application.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="difference of model name from what is shown" class="image-1 jive-image" height="340" src="https://community.esri.com/legacyfs/online/448880_modelnames.png" width="518" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 17:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/different-behavior-when-i-run-geoprocessing-tool/m-p/638077#M17175</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2019-05-30T17:48:12Z</dc:date>
    </item>
  </channel>
</rss>

