<?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: add-in MessageBox in sync with geoprocessing tool in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1413496#M11399</link>
    <description>&lt;P&gt;Thanks for the reply! I did get a chance to look at the geoprocessing doc. The use case I am going after is that the SDK needs to become aware of an external process(an event). The event being a python toolbox being executed manually from ArcPro (from an analyst perspective).&lt;/P&gt;&lt;P&gt;I can’t seem to find a namespace in the API that will let me subscribe to an external process since the tool and its parameters must be run inside the SDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once the SDK becomes aware of a tool being run manually and the tool completes or fails, it generates a message box.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2024 13:45:03 GMT</pubDate>
    <dc:creator>awesomeLLama27</dc:creator>
    <dc:date>2024-04-22T13:45:03Z</dc:date>
    <item>
      <title>add-in MessageBox in sync with geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1404790#M11318</link>
      <description>&lt;P&gt;Hello, I am trying to generate a UI message box&amp;nbsp; if my python toolbox fails. That way it is apparent to an analyst that an error has occurred. The toolbox needs to run in ArcPro. So it is separate from&amp;nbsp; the .NET framework. I am using ArcPro SDK Version 3.0 and use ArcPro 3.0.3. I have a basic example with SDK that I created: a button add-in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the config.daml :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;ArcGIS defaultAssembly="ProAppModule2.dll" defaultNamespace="ProAppModule2" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd"&amp;gt;
  &amp;lt;AddInInfo id="{6e4b01b2-c416-4d9a-9c65-c0474d5093ec}" version="1.0" desktopVersion="3.0.36057"&amp;gt;
    &amp;lt;Name&amp;gt;ProAppModule2&amp;lt;/Name&amp;gt;
    &amp;lt;Description&amp;gt;ProAppModule2 description&amp;lt;/Description&amp;gt;
    &amp;lt;Image&amp;gt;Images\AddinDesktop32.png&amp;lt;/Image&amp;gt;
    &amp;lt;Author&amp;gt;User&amp;lt;/Author&amp;gt;
    &amp;lt;Company&amp;gt;Company&amp;lt;/Company&amp;gt;
    &amp;lt;Date&amp;gt;3/28/2024 10:01:36 AM&amp;lt;/Date&amp;gt;
    &amp;lt;Subject&amp;gt;Framework&amp;lt;/Subject&amp;gt;
    &amp;lt;!-- Note subject can be one or more of these topics:
                    Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration --&amp;gt;
  &amp;lt;/AddInInfo&amp;gt;
  &amp;lt;modules&amp;gt;
    &amp;lt;insertModule id="ProAppModule2_Module" className="Module1" autoLoad="false" caption="Module1"&amp;gt;
      &amp;lt;!-- uncomment to have the control hosted on a separate tab--&amp;gt;
      &amp;lt;tabs&amp;gt;
        &amp;lt;!--&amp;lt;tab id="ProAppModule2_Tab1" caption="New Tab"&amp;gt;
          &amp;lt;group refID="ProAppModule2_Group1"/&amp;gt;
        &amp;lt;/tab&amp;gt;--&amp;gt;
      &amp;lt;/tabs&amp;gt;
      &amp;lt;groups&amp;gt;
        &amp;lt;!-- comment this out if you have no controls on the Addin tab to avoid
              an empty group--&amp;gt;
        &amp;lt;group id="ProAppModule2_Group1" caption="Project Test Tool" appearsOnAddInTab="true"&amp;gt;
          &amp;lt;!-- host controls within groups --&amp;gt;
          &amp;lt;button refID="ProAppModule2_Button1" size="large" /&amp;gt;
        &amp;lt;/group&amp;gt;
      &amp;lt;/groups&amp;gt;
      &amp;lt;controls&amp;gt;
        &amp;lt;!-- add your controls here --&amp;gt;
        &amp;lt;button id="ProAppModule2_Button1" caption="WKT Import" className="Button1" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png"&amp;gt;
          &amp;lt;tooltip heading="Tooltip Heading"&amp;gt;Tooltip text&amp;lt;disabledText /&amp;gt;&amp;lt;/tooltip&amp;gt;
        &amp;lt;/button&amp;gt;
      &amp;lt;/controls&amp;gt;
    &amp;lt;/insertModule&amp;gt;
  &amp;lt;/modules&amp;gt;
&amp;lt;/ArcGIS&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Button1.cs :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;namespace ProAppModule2
{
    internal class Button1 : Button
    {
        protected override void OnClick()
        {
            //string stringURI = ArcGIS.Desktop.Core.Project.Current.URI;
            //ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show($"Project path: {stringURI}", "Project Info");
            MessageBox.Show("Query returned no results. Please select a different AOI boundary.", "Error");
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The add-in shows correctly in arcpro. However I need a way for the python toolbox to be in sync with the add in and for the add in to just run without user action on my part. The python toolbox failing initiates the action to run the add-in and display the message box. Is this possible ?&lt;/P&gt;&lt;P&gt;Here is what the message box looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="error message box" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99789i40B238563093F6D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="errormessage.PNG" alt="error message box" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;error message box&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 12:47:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1404790#M11318</guid>
      <dc:creator>awesomeLLama27</dc:creator>
      <dc:date>2024-04-09T12:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: add-in MessageBox in sync with geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1410434#M11376</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A .NET Addin can launch Geoprocessing tools (and display messages). Consult this doc for the various ways by which you use the .NET Pro SDK to run GP Tools:&amp;nbsp;&lt;A title="ProConcepts: Geoprocessing" href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing" target="_blank" rel="noopener"&gt;ProConcepts: Geoprocessing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 17:02:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1410434#M11376</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-04-16T17:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: add-in MessageBox in sync with geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1413496#M11399</link>
      <description>&lt;P&gt;Thanks for the reply! I did get a chance to look at the geoprocessing doc. The use case I am going after is that the SDK needs to become aware of an external process(an event). The event being a python toolbox being executed manually from ArcPro (from an analyst perspective).&lt;/P&gt;&lt;P&gt;I can’t seem to find a namespace in the API that will let me subscribe to an external process since the tool and its parameters must be run inside the SDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once the SDK becomes aware of a tool being run manually and the tool completes or fails, it generates a message box.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 13:45:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/add-in-messagebox-in-sync-with-geoprocessing-tool/m-p/1413496#M11399</guid>
      <dc:creator>awesomeLLama27</dc:creator>
      <dc:date>2024-04-22T13:45:03Z</dc:date>
    </item>
  </channel>
</rss>

