<?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: ProgressDialog appears inconsistently in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232772#M9092</link>
    <description>&lt;P&gt;Wolf, thanks for your insight.&amp;nbsp; The problem for me is that the dialog is appearing for a split second, then disappearing, during the very first step.&amp;nbsp; But not all the time.&amp;nbsp; When the dialog does persist, the code doesn't have any issues updating with the status of multiple tools.&amp;nbsp; I just haven't found the cause of the disappearing dialog.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 16:28:38 GMT</pubDate>
    <dc:creator>DanielRatzlaff</dc:creator>
    <dc:date>2022-11-17T16:28:38Z</dc:date>
    <item>
      <title>ProgressDialog appears inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1228920#M9028</link>
      <description>&lt;P&gt;I have a bit of code that executes two Geoprocessing tools.&amp;nbsp; I create a ProgressDialog to show the progress, but I'm at a loss to determine why it sometimes shows and sometimes does not show.&amp;nbsp; To be more precise, sometimes the dialog appears for a split second, then disappears.&amp;nbsp; The Geoprocessing.ExecuteToolAsync still runs in the background, but my users will need that feedback from the ProgressDialog.&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var mergeDlg = new ProgressDialog("Merging and Clipping Raster", "Cancel", 100, false);
var progsrc=new CancelableProgressorSource(mergeDlg);

await Geoprocessing.ExecuteToolAsync(
    short_mergetool_name,
    mergeParams,
    env,
    progSrc.Progressor,
    GPExecuteToolFlags.None);

await Geoprocessing.ExecuteToolAsync(
    short_cliptool_name,
    clipParams,
    null,
    progSrc.Progressor,
    GPExecuteToolFlags.Default);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried bracketing the ExecuteToolAsync calls with mergeDlg.Show() and .Hide(), but it doesn't seem to make any difference.&amp;nbsp; Sometimes it displays, sometimes it doesn't.&lt;/P&gt;&lt;P&gt;The only other possibly relevant info I can think of is that further up in the code, I'm creating a separate simple ProgressDialog that displays during archive extraction.&amp;nbsp; That one always displays with .Show() / .Hide().&amp;nbsp; I'm not passing that one to any Geoprocessing tools.&lt;/P&gt;&lt;P&gt;Oh, and I'm not running this with the debugger.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 21:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1228920#M9028</guid>
      <dc:creator>DanielRatzlaff</dc:creator>
      <dc:date>2022-11-04T21:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: ProgressDialog appears inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232458#M9089</link>
      <description>&lt;P&gt;I still haven't figured out what's causing the dialog to sometimes disappear immediately, so I abandoned using the ProgressDialog and instead built my own UI in my dockpane and use a CancelableProgressorSource with my own callback to update the UI.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 21:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232458#M9089</guid>
      <dc:creator>DanielRatzlaff</dc:creator>
      <dc:date>2022-11-16T21:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: ProgressDialog appears inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232766#M9091</link>
      <description>&lt;P&gt;You have to reset the progressor's value back to 0 between GP tasks.&amp;nbsp; I also updated the Message string to show what GP Task is running. This worked for me:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var mergeDlg = new ProgressDialog("Creating multiple buffers", "Cancel", 100, false);
var progsrc=new CancelableProgressorSource(mergeDlg);
progsrc.Message = "Creating inner buffer: step 1";
await Geoprocessing.ExecuteToolAsync("analysis.Buffer", valueArrays.InnerBuffer, null, progsrc.Progressor);
progsrc.Value = 0;
progsrc.Message = "Creating center buffer: step 2";
await Geoprocessing.ExecuteToolAsync("analysis.Buffer", valueArrays.CenterBuffer, null, progsrc.Progressor);
progsrc.Value = 0;
progsrc.Message = "Creating outer buffer: step 3";
await Geoprocessing.ExecuteToolAsync("analysis.Buffer", valueArrays.OuterBuffer, null, progsrc.Progressor);&lt;/LI-CODE&gt;&lt;P&gt;The screenshot below is taken while processing the last GP task.&amp;nbsp; As you can see the progress dialog is still displaying.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_1-1668701932986.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56224i23D3E4A66009F6C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_1-1668701932986.png" alt="Wolf_1-1668701932986.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 16:21:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232766#M9091</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-11-17T16:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: ProgressDialog appears inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232772#M9092</link>
      <description>&lt;P&gt;Wolf, thanks for your insight.&amp;nbsp; The problem for me is that the dialog is appearing for a split second, then disappearing, during the very first step.&amp;nbsp; But not all the time.&amp;nbsp; When the dialog does persist, the code doesn't have any issues updating with the status of multiple tools.&amp;nbsp; I just haven't found the cause of the disappearing dialog.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 16:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progressdialog-appears-inconsistently/m-p/1232772#M9092</guid>
      <dc:creator>DanielRatzlaff</dc:creator>
      <dc:date>2022-11-17T16:28:38Z</dc:date>
    </item>
  </channel>
</rss>

