<?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 Execute a command in C# in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794704#M1741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the snippits gallery there is an example of executing a built in ArcGIS Pro command. Does anyone know where I can find&amp;nbsp;the list of these commands?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich Daniels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;esri_editing_ShowAttributes&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; command = wrapper &lt;SPAN&gt;as&lt;/SPAN&gt; ICommand; &lt;SPAN&gt;// tool and command(Button) supports this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; ((command != &lt;SPAN&gt;null&lt;/SPAN&gt;) &amp;amp;&amp;amp; command.CanExecute(&lt;SPAN&gt;null&lt;/SPAN&gt;))&lt;BR /&gt;&amp;nbsp; command.Execute(&lt;SPAN&gt;null&lt;/SPAN&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2016 21:09:33 GMT</pubDate>
    <dc:creator>RichardDaniels</dc:creator>
    <dc:date>2016-10-20T21:09:33Z</dc:date>
    <item>
      <title>Execute a command in C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794704#M1741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the snippits gallery there is an example of executing a built in ArcGIS Pro command. Does anyone know where I can find&amp;nbsp;the list of these commands?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich Daniels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;esri_editing_ShowAttributes&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; command = wrapper &lt;SPAN&gt;as&lt;/SPAN&gt; ICommand; &lt;SPAN&gt;// tool and command(Button) supports this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; ((command != &lt;SPAN&gt;null&lt;/SPAN&gt;) &amp;amp;&amp;amp; command.CanExecute(&lt;SPAN&gt;null&lt;/SPAN&gt;))&lt;BR /&gt;&amp;nbsp; command.Execute(&lt;SPAN&gt;null&lt;/SPAN&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 21:09:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794704#M1741</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2016-10-20T21:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a command in C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794705#M1742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see a list of all these commands on this page: &amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk/wiki/Button%20DAML%20ID%20Reference" title="https://github.com/Esri/arcgis-pro-sdk/wiki/Button%20DAML%20ID%20Reference"&gt;Button DAML ID Reference · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma Harano&lt;/P&gt;&lt;P&gt;ArcGIS Desktop SDK team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 21:14:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794705#M1742</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2016-10-20T21:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a command in C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794706#M1743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is also&amp;nbsp;the&amp;nbsp;"Pro Generate DAML Id"&amp;nbsp;utility described here:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki#arcgis-pro-sdk-for-net-utilities"&gt;Arcgis Pro SDK for .Net utilities&lt;/A&gt;.&amp;nbsp; This utility allows generating a source file in your add-in project&amp;nbsp;that contains&amp;nbsp;DAML Ids for all plug-ins.&amp;nbsp;&amp;nbsp;DAML ids are organized by type and the DAML Id string usually describes&amp;nbsp;the purpose of the associated pug-in.&amp;nbsp;&amp;nbsp;Once you generate a DAML Id&amp;nbsp;source file,&amp;nbsp;you&amp;nbsp;can then&amp;nbsp;reference the DAML Id through a constant using Visual Studio IntelliSense and avoid misspelled Ids.&amp;nbsp; This sample illustrates the DAML Id usage:&amp;nbsp; &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/HookProCommands"&gt;HookProCommands&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 22:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794706#M1743</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2016-10-20T22:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a command in C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794707#M1744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get some of the buttons/tools to work you need to programmatically activate the tab&amp;nbsp;that the tool or&amp;nbsp;button is on prior to executing. This is because the tool/button is disabled if the tab is not the &amp;nbsp;current tab. For example, the following activates the Analyst ribbon/tab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;FrameworkApplication&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ActivateTab("&lt;/SPAN&gt;esri_core_analysisTab");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are running a gp that is inside a&amp;nbsp;group (vs. just a button)&amp;nbsp;you may also need to 'run' the DAML Id of the group it is in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;esri_geoprocessing_analysisTools&lt;SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;);&lt;BR /&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; command = wrapper &lt;SPAN&gt;as&lt;/SPAN&gt; ICommand; &lt;SPAN&gt;// tool and command(Button) supports this&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; ((command != &lt;SPAN&gt;null&lt;/SPAN&gt;) &amp;amp;&amp;amp; command.CanExecute(&lt;SPAN&gt;null&lt;/SPAN&gt;))&lt;BR /&gt;&amp;nbsp; command.Execute(&lt;SPAN&gt;null&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you can run the gp.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; param_values3 = &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;Geoprocessing&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.MakeValueArray(null,null,"2 Miles");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: Consolas;"&gt;//run the geoprocessing tool&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-size: small; font-family: Consolas;"&gt;Geoprocessing&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;.OpenToolDialog("&lt;/SPAN&gt;analysis.Buffer&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;&lt;SPAN style="color: #008000; font-family: Consolas; font-size: small;"&gt;",&lt;/SPAN&gt; param_values3);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 16:19:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/execute-a-command-in-c/m-p/794707#M1744</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2016-10-21T16:19:19Z</dc:date>
    </item>
  </channel>
</rss>

