<?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 Async Geoprocessing problem with Cancel method in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/async-geoprocessing-problem-with-cancel-method/m-p/493750#M13284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a simple geoprocessor that runs as async&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
_geoProcessorResult = (IGeoProcessorResult2)Geoprocessor.ExecuteAsync(ArcPadGeoprocessorToolName, operationalParameters);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;as the process is working I would like to have an option to cancel it so then I call&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
if (_geoProcessorResult != null) _geoProcessorResult.Cancel();
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an event wired for ToolExecuted and other events and after I call Cancel the process does not cancel, ToolExecuted is not called and eventually it will finish processing and call to ToolExecuted is made with status 'success' so know its wired right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here are some events that I've wired&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor.MessagesCreated += new EventHandler&amp;lt;MessagesCreatedEventArgs&amp;gt;(Geoprocessor_MessagesCreated);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor.ToolExecuting += new EventHandler&amp;lt;ToolExecutingEventArgs&amp;gt;(Geoprocessor_ToolExecuting);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor.ToolExecuted += new EventHandler&amp;lt;ToolExecutedEventArgs&amp;gt;(Geoprocessor_ToolExecuted);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2014 17:37:38 GMT</pubDate>
    <dc:creator>PrzemyslawTyrtania</dc:creator>
    <dc:date>2014-02-05T17:37:38Z</dc:date>
    <item>
      <title>Async Geoprocessing problem with Cancel method</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/async-geoprocessing-problem-with-cancel-method/m-p/493750#M13284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a simple geoprocessor that runs as async&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
_geoProcessorResult = (IGeoProcessorResult2)Geoprocessor.ExecuteAsync(ArcPadGeoprocessorToolName, operationalParameters);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;as the process is working I would like to have an option to cancel it so then I call&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
if (_geoProcessorResult != null) _geoProcessorResult.Cancel();
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an event wired for ToolExecuted and other events and after I call Cancel the process does not cancel, ToolExecuted is not called and eventually it will finish processing and call to ToolExecuted is made with status 'success' so know its wired right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here are some events that I've wired&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor.MessagesCreated += new EventHandler&amp;lt;MessagesCreatedEventArgs&amp;gt;(Geoprocessor_MessagesCreated);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor.ToolExecuting += new EventHandler&amp;lt;ToolExecutingEventArgs&amp;gt;(Geoprocessor_ToolExecuting);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor.ToolExecuted += new EventHandler&amp;lt;ToolExecutedEventArgs&amp;gt;(Geoprocessor_ToolExecuted);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 17:37:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/async-geoprocessing-problem-with-cancel-method/m-p/493750#M13284</guid>
      <dc:creator>PrzemyslawTyrtania</dc:creator>
      <dc:date>2014-02-05T17:37:38Z</dc:date>
    </item>
  </channel>
</rss>

