<?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 Calling an Embedded Toolbox - Get executing Assembly Location in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/calling-an-embedded-toolbox-get-executing-assembly/m-p/1052772#M6533</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been following the instructions here, to embed a toolbox and it works fine for embedding.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#embedding-toolboxes" target="_blank"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#embedding-toolboxes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-toolboxes-in-arcgis-pro/td-p/794965#comments" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-toolboxes-in-arcgis-pro/td-p/794965#comments&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have been using the code snippet that I found at the end of this post by&amp;nbsp; to reference the embedded toolbox.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-my-custom-toolbox-within-my-arcpro-add-in/m-p/732260" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-my-custom-toolbox-within-my-arcpro-add-in/m-p/732260&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, this code returns a path with&amp;nbsp; the assembly location. like this&lt;/P&gt;&lt;P&gt;C:\Users\username\AppData\Local\ESRI\ArcGISPro\AssemblyCache\{243459f3-4fc8-4c96-ae0c-139814c9750e}&lt;/P&gt;&lt;P&gt;and it needs to be&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\Users\username\AppData\Local\ESRI\ArcGISPro\Toolboxes\{243459f3-4fc8-4c96-ae0c-139814c9750e}&lt;/P&gt;&lt;P&gt;I have modified my code, to replace the string "AssemblyCache" and this works, but is there a cleaner way to do this? my code is below&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;string assemblyfolderpath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string finalpath = assemblyfolderpath.Replace("AssemblyCache", "Toolboxes");
string tool_path = System.IO.Path.Combine(finalpath,@"toolboxes\Default.tbx\CreateScenario");&lt;/LI-CODE&gt;&lt;P&gt;Thank you in advance for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 16:01:22 GMT</pubDate>
    <dc:creator>AndersBerg1</dc:creator>
    <dc:date>2021-04-29T16:01:22Z</dc:date>
    <item>
      <title>Calling an Embedded Toolbox - Get executing Assembly Location</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/calling-an-embedded-toolbox-get-executing-assembly/m-p/1052772#M6533</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been following the instructions here, to embed a toolbox and it works fine for embedding.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#embedding-toolboxes" target="_blank"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#embedding-toolboxes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-toolboxes-in-arcgis-pro/td-p/794965#comments" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-toolboxes-in-arcgis-pro/td-p/794965#comments&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have been using the code snippet that I found at the end of this post by&amp;nbsp; to reference the embedded toolbox.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-my-custom-toolbox-within-my-arcpro-add-in/m-p/732260" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/embedding-my-custom-toolbox-within-my-arcpro-add-in/m-p/732260&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, this code returns a path with&amp;nbsp; the assembly location. like this&lt;/P&gt;&lt;P&gt;C:\Users\username\AppData\Local\ESRI\ArcGISPro\AssemblyCache\{243459f3-4fc8-4c96-ae0c-139814c9750e}&lt;/P&gt;&lt;P&gt;and it needs to be&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\Users\username\AppData\Local\ESRI\ArcGISPro\Toolboxes\{243459f3-4fc8-4c96-ae0c-139814c9750e}&lt;/P&gt;&lt;P&gt;I have modified my code, to replace the string "AssemblyCache" and this works, but is there a cleaner way to do this? my code is below&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;string assemblyfolderpath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string finalpath = assemblyfolderpath.Replace("AssemblyCache", "Toolboxes");
string tool_path = System.IO.Path.Combine(finalpath,@"toolboxes\Default.tbx\CreateScenario");&lt;/LI-CODE&gt;&lt;P&gt;Thank you in advance for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 16:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/calling-an-embedded-toolbox-get-executing-assembly/m-p/1052772#M6533</guid>
      <dc:creator>AndersBerg1</dc:creator>
      <dc:date>2021-04-29T16:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calling an Embedded Toolbox - Get executing Assembly Location</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/calling-an-embedded-toolbox-get-executing-assembly/m-p/1325720#M10330</link>
      <description>&lt;P&gt;After trying to resolve this for a while i found that once you have embedded the toolbox you can access it like a system toolbox, i.e&amp;nbsp; &amp;lt;&lt;EM&gt;toolboxName&lt;/EM&gt;&amp;gt;.&amp;lt;&lt;EM&gt;toolName&lt;/EM&gt;&amp;gt; you dont need to know its full path&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 03:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/calling-an-embedded-toolbox-get-executing-assembly/m-p/1325720#M10330</guid>
      <dc:creator>AntDevEsk</dc:creator>
      <dc:date>2023-09-06T03:10:39Z</dc:date>
    </item>
  </channel>
</rss>

