<?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: Fire custom tool from another custom tool in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411931#M11037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;I use Execute for custom Commands and CurrentTool method from IApplication for custom Tools. They work a little bit different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 May 2019 13:54:40 GMT</pubDate>
    <dc:creator>GKmieliauskas</dc:creator>
    <dc:date>2019-05-09T13:54:40Z</dc:date>
    <item>
      <title>Fire custom tool from another custom tool</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411930#M11036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to run a custom tool from an Editor Extension I am building.&amp;nbsp; I've done this before with out of the box ArcMap tools (ie. Zoom to Selection), but for some reason this code I am using will not work for a custom tool I have created.&amp;nbsp; The tool GUID is&amp;nbsp;{079952c5-83c1-49e8-bd1a-4440f623281f} and it is definitely in my map, but when I run the tool&amp;nbsp;it can't seem to find it based on the GUID, so&amp;nbsp;cmdItem is null and the line "cmdItem.Execute();" does not run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what I am doing wrong??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;                            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inFeature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Fields&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FindField&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FACILITYID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                            &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                ICommandBars cmdBars &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ArcMap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Application&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CommandBars&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                                
                                UID uid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;UID&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                                uid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{079952c5-83c1-49e8-bd1a-4440f623281f}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                                ICommandItem cmdItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; cmdBars&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                                &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;cmdItem &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                                    cmdItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Execute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:41:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411930#M11036</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2021-12-11T18:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fire custom tool from another custom tool</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411931#M11037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;I use Execute for custom Commands and CurrentTool method from IApplication for custom Tools. They work a little bit different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2019 13:54:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411931#M11037</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-05-09T13:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fire custom tool from another custom tool</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411932#M11038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gintatuas, &lt;A href="https://community.esri.com/migrated-users/3324" target="_blank"&gt;Sean Jones&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done some messing around and my code seems to work with other tools in the map (ie.&amp;nbsp;{AB073B49-DE5E-11D1-AA80-00C04FA37860} which is the Zoom to Selection button), but with my custom tool this bit of code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;UID uid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;UIDClass&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
uid&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{079952c5-83c1-49e8-bd1a-4440f623281f}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                             
ICommandItem cmdItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; cmdBars&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cannot find the tool.&amp;nbsp; That is for sure the GUID of the tool.&amp;nbsp; Do you know if there is a setting in the Config.esriaddinx file that I might need to set to make it 'Public'??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:41:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411932#M11038</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2021-12-11T18:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fire custom tool from another custom tool</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411933#M11039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Brian,&lt;/P&gt;&lt;P&gt;Where are you getting the GUID for the tool from? If its an add-in dont get confused with the GUID of the add-in itself, as shown in the config file.&lt;/P&gt;&lt;P&gt;For an add-in tool you would normally use the ID of the tool to find it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. config.esriaddinx&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;AddIn&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;language&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;CLR&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;library&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;ExplodePartAsFeature.dll&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;namespace&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;ParttoFeature&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
    &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;ArcMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
      &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;Commands&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
        &amp;lt;Tool id="ParttoFeature_ParttoFeatureCmd" ...
        &amp;lt;Button id="ParttoFeature_ActivatePart" ...
      &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;/&lt;/SPAN&gt;Commands&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to find the "ParttoFeature_ParttoFeatureCmd" tool&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      &lt;SPAN class="comment token"&gt;//find the addin tool&lt;/SPAN&gt;
      ICommandBars documentBars &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ArcMap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Application&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CommandBars&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      UID cmdID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;UIDClass&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      cmdID&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ParttoFeature_ParttoFeatureCmd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      ICommandItem cmdItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; documentBars&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;cmdID&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      ArcMap&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Application&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CurrentTool &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; cmdItem&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:41:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411933#M11039</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T18:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fire custom tool from another custom tool</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411934#M11040</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/3324"&gt;Sean Jones&lt;/A&gt;‌.&amp;nbsp; Changing from using the GUID from the Config file to the ID worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; I would have thought using the GUID would have been the proper choice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2019 13:54:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/fire-custom-tool-from-another-custom-tool/m-p/411934#M11040</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2019-05-10T13:54:13Z</dc:date>
    </item>
  </channel>
</rss>

