<?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: Inability to create a progress dialog in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128427#M7529</link>
    <description>&lt;P&gt;Kirk,&lt;/P&gt;&lt;P&gt;Thank you for responding. I actually just came across another thread before you responded that stated that progress dialogs are disabled while debugging in Visual Studio, which is what I am doing.&amp;nbsp; With that being said, I have just tested the functionality outside of debugging and I see the progress dialog pop up.&amp;nbsp; However, it is not functioning as it should.&amp;nbsp; It appears for only a second or two and does not display the progress messages that are in the code.&amp;nbsp; The dialog does not run for the ten seconds that it is supposed to and doesn't display an update message after each iteration of a second through the loop.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 19:52:01 GMT</pubDate>
    <dc:creator>DaveLewis73</dc:creator>
    <dc:date>2021-12-22T19:52:01Z</dc:date>
    <item>
      <title>Inability to create a progress dialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128410#M7527</link>
      <description>&lt;P&gt;I am running into a problem attempting to create a progress dialog.&amp;nbsp; I have implemented the code below that I found on a thread from this forum, but I get absolutely nothing.&amp;nbsp; The task delay of 10 seconds works, but I do not see a progress dialog at all.&amp;nbsp; I have tested this in two different add-ins, including one that was created just to test this functionality.&amp;nbsp; I have also had a fellow team member test on another computer to no effect.&amp;nbsp; In addition, I have also checked out and tested with the code from &lt;A href="https://github.com/esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProgressDialog&lt;/A&gt;.&amp;nbsp; Any thoughts?&amp;nbsp; Am I missing something?&lt;/P&gt;&lt;P&gt;As an fyi, I am developing with ArcGIS Pro 2.9 (if that means anything).&lt;/P&gt;&lt;P&gt;The following is the code that I am using:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;            using (ProgressDialog progDialog = new ProgressDialog("Showing Progress", "Canceled", 100, false))
            {
                CancelableProgressorSource cps = new CancelableProgressorSource(progDialog)
                {
                    Max = 100
                };
                progDialog.Show();

                await QueuedTask.Run(async () =&amp;gt;
                {
                    //uint step = 0;
                    for (int idx = 0; idx &amp;lt; 10; idx++)
                    {
                        await Task.Delay(1000);
                        cps.Progressor.Value += 10;
                        cps.Progressor.Status = (cps.Progressor.Value * 100 / cps.Progressor.Max) + @" % Completed";
                        cps.Progressor.Message = "Message " + cps.Progressor.Value;
                    }
                }, cps.Progressor);

                progDialog.Hide();
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 19:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128410#M7527</guid>
      <dc:creator>DaveLewis73</dc:creator>
      <dc:date>2021-12-22T19:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Inability to create a progress dialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128423#M7528</link>
      <description>&lt;P&gt;Are you running in debug mode?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;Progress Dialog boxes are disabled when debugging in Visual Studio.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 22 Dec 2021 19:30:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128423#M7528</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2021-12-22T19:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Inability to create a progress dialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128427#M7529</link>
      <description>&lt;P&gt;Kirk,&lt;/P&gt;&lt;P&gt;Thank you for responding. I actually just came across another thread before you responded that stated that progress dialogs are disabled while debugging in Visual Studio, which is what I am doing.&amp;nbsp; With that being said, I have just tested the functionality outside of debugging and I see the progress dialog pop up.&amp;nbsp; However, it is not functioning as it should.&amp;nbsp; It appears for only a second or two and does not display the progress messages that are in the code.&amp;nbsp; The dialog does not run for the ten seconds that it is supposed to and doesn't display an update message after each iteration of a second through the loop.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 19:52:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128427#M7529</guid>
      <dc:creator>DaveLewis73</dc:creator>
      <dc:date>2021-12-22T19:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inability to create a progress dialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128473#M7530</link>
      <description>&lt;P&gt;This works for me ...&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;protected override async void OnClick()
{
    await Test();
    //If you run this in the DEBUGGER you will NOT see the dialog
    //var ps = new ProgressorSource("Doing my thing...");
    //ps.Max = 5;
    //await ProgressDialogModule.RunProgress(ps, 5);
}
private static async Task Test()
{
    using (var progDialog = new ArcGIS.Desktop.Framework.Threading.Tasks.
                    ProgressDialog("Showing Test Progress", "Canceled", 100, false))
    {
        CancelableProgressorSource cps = new CancelableProgressorSource(progDialog)
        {
            Max = 100                    
        };
        progDialog.Show();
        for (int idx = 0; idx &amp;lt; 10; idx++)
        {
            await Task.Delay(1000);
            cps.Progressor.Value += 10;
            cps.Progressor.Status = (cps.Progressor.Value * 100 / cps.Progressor.Max) + @" % Completed";
            cps.Progressor.Message = "Message " + cps.Progressor.Value;
        }
        progDialog.Hide();
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Dec 2021 21:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128473#M7530</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2021-12-22T21:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inability to create a progress dialog</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128484#M7531</link>
      <description>&lt;P&gt;Thanks again Kirk.&lt;/P&gt;&lt;P&gt;The code worked by getting rid of that&amp;nbsp;&lt;STRONG&gt;await QueuedTask.Run&lt;/STRONG&gt;.&amp;nbsp; I had a feeling that there was probably something with the async code that was causing the problem.&amp;nbsp; However, as an fyi, I did have to make a couple of slight adjustments, though.&amp;nbsp; I moved the&amp;nbsp;&lt;STRONG&gt;await Task.Delay(1000);&lt;/STRONG&gt; down to the bottom of the loop and I added a line of code to kick out if the progress is canceled.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 21:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/inability-to-create-a-progress-dialog/m-p/1128484#M7531</guid>
      <dc:creator>DaveLewis73</dc:creator>
      <dc:date>2021-12-22T21:55:51Z</dc:date>
    </item>
  </channel>
</rss>

