Hi,
I have been following the instructions here, to embed a toolbox and it works fine for embedding.
https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#embedding-toolboxes
I have been using the code snippet that I found at the end of this post by to reference the embedded toolbox.
However, this code returns a path with the assembly location. like this
C:\Users\username\AppData\Local\ESRI\ArcGISPro\AssemblyCache\{243459f3-4fc8-4c96-ae0c-139814c9750e}
and it needs to be
C:\Users\username\AppData\Local\ESRI\ArcGISPro\Toolboxes\{243459f3-4fc8-4c96-ae0c-139814c9750e}
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
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");
Thank you in advance for your help
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 <toolboxName>.<toolName> you dont need to know its full path