<?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 Progress dialog with messages in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858706#M4647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hello everybody,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I am in the middle of a project and I have a question regarding interactions between arcgis pro and Python.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I want to execute a tool with the progress dialog.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I already found the documentation for doing just that&amp;nbsp;:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fesri%2Farcgis-pro-sdk%2Fwiki%2FProConcepts-Geoprocessing%23executing-a-tool-with-the-progress-dialog" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#executing-a-tool-with-the-progress-dialog&lt;/A&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;My problem, is that i also want to display arcpy messages (I use arcpy.AddMessage function).&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Is there a way to achieve that&amp;nbsp;?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Oct 2019 16:01:01 GMT</pubDate>
    <dc:creator>KarimD</dc:creator>
    <dc:date>2019-10-30T16:01:01Z</dc:date>
    <item>
      <title>Progress dialog with messages</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858706#M4647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hello everybody,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I am in the middle of a project and I have a question regarding interactions between arcgis pro and Python.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I want to execute a tool with the progress dialog.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I already found the documentation for doing just that&amp;nbsp;:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;A class="" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2Fesri%2Farcgis-pro-sdk%2Fwiki%2FProConcepts-Geoprocessing%23executing-a-tool-with-the-progress-dialog" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#executing-a-tool-with-the-progress-dialog&lt;/A&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;My problem, is that i also want to display arcpy messages (I use arcpy.AddMessage function).&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Is there a way to achieve that&amp;nbsp;?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 16:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858706#M4647</guid>
      <dc:creator>KarimD</dc:creator>
      <dc:date>2019-10-30T16:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Progress dialog with messages</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858707#M4648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you execute a gp tool you get back a result object:&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE style="color: #24292e; background-color: #f6f8fa; padding: 16px;"&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;result&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;await&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;Geoprocessing&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;ExecuteToolAsync&lt;/SPAN&gt;(&lt;SPAN class="" style="color: #24292e;"&gt;tool_path&lt;/SPAN&gt;, ....)&lt;/PRE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;The result object, among other information, contains the messages returned by the tool.&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;You can get them by Messages property as follows:&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;var messages = result.Messages&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;In our SDK (&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9360.html" title="https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9360.html"&gt;ArcGIS Pro 2.4 API Reference Guide&lt;/A&gt;&amp;nbsp;), if the link does not take you directly to IGPResult, browse to:&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;ArcGIS.Desktop.Core Assembly &amp;gt; Namespaces &amp;gt; ArcGIS.Desktop.Core.Geoprocessing &amp;gt; Interfaces &amp;gt; IGPResult &amp;gt; Members&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2019 19:06:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858707#M4648</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2019-10-30T19:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Progress dialog with messages</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858708#M4649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/10113"&gt;Nobbir Ahmed&lt;/A&gt;,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;What you are describing is a way to display messages after the python geoprocessing script finishes (&lt;A class="link-titled" href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#after-execution-of-the-geoprocessing-tools-is-complete" title="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#after-execution-of-the-geoprocessing-tools-is-complete"&gt;ProConcepts Geoprocessing · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;).&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;I am searching for a way to display the messages&amp;nbsp;during their&amp;nbsp;generation (ie. during the execution of the Python script), in "real time."&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Ideally, they can be displayed in the process dialog which doesn't display that much currently.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Is there a way to do that ?&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 08:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858708#M4649</guid>
      <dc:creator>KarimD</dc:creator>
      <dc:date>2019-10-31T08:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Progress dialog with messages</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858709#M4650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The python script works out-of-process when you call the script from within .Net SDK. Unfortunately, I don't know a way to get the messages in real-time &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Here is an sample code that you can try with: it implements delegate and handle events (such as OnProgressMessage, OnProgressPos or OnValidate:&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#executing-a-tool-with-the-progress-dialog"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing#executing-a-tool-with-the-progress-dialog&lt;/A&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Let us know if you successfully implement your objective.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 16:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858709#M4650</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2019-10-31T16:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Progress dialog with messages</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858710#M4651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/10113"&gt;Nobbir Ahmed&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Just to inform on how I handled the problem.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the end, I couldn't find a way to get messages in real time, so I just added a logging system to my python script.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;it is not worth the real time, but it allows for ex post analyzes.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a good day,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2020 22:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/progress-dialog-with-messages/m-p/858710#M4651</guid>
      <dc:creator>KarimD</dc:creator>
      <dc:date>2020-07-06T22:08:15Z</dc:date>
    </item>
  </channel>
</rss>

