Embedding Toolboxes in ArcGIS Pro

1419
5
Jump to solution
08-16-2019 04:26 AM
BenRalph
New Contributor II

UPDATE: Moved question to ArcGIS Pro SDK and mentioning Uma Harano‌ as the author of the embedded toolbox article.

I'm following the instructions to embed a toolbox in arcgis pro here, but am getting mixed results. In Visual Studio I've created the esriAddinX with the .tbx, and after starting Pro I can see it has correctly extracted the toolbox into %LocalAppData%\ESRI\ArcGISPro\Toolboxes\GUID\. So far so good.

I'm expecting to see my addin's toolbox listed in Pro's system Geoprocessing toolboxes as per instruction 13 in the guide, but I don't.  What am I missing? I've verified that the extracted toolbox is good, and I've populated everything in the .tbx like alias, name, description, etc.

I haven't tried a python toolbox because I want to have toolsets, but if someone knows the .pyt works, then please let me know and I'll go with that. Any ideas/samples will be greatly appreciated. I'm using ArcGIS Pro 2.4.1.

This screenshot is attempting to show the esriAddinX contents being correctly extracted. 

esriAddinX with embedded toolbox

Tags (3)
1 Solution

Accepted Solutions
GhislainPrince
Esri Contributor

Hi ben,

 i think your add-in may not be following the expected folder structure.  Review step3 in the embedding toolboxes add-in doc. Your toolbox should go under Toolboxes/toolboxes along with (optional) other folders.

Below is the directory structure for the add-in i created.

cheers

\---Toolboxes

    +---arcpy
    |       DeepThought.py
    |
    +---help
    |   \---gp
    |       |   Answer_deepthought.xml
    |       |   deepthought_toolbox.xml
    |       |
    |       +---messages
    |       |       messages.xml
    |       |
    |       \---toolboxes
    |               DeepThought.xml
    |
    \---toolboxes
            answer.py
            DeepThought.tbx
            sixbynine.py
 

View solution in original post

5 Replies
KoryKramer
Esri Community Moderator

Maybe posting in the ArcGIS Pro SDK‌ space would be better for this issue specifically.

0 Kudos
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Ben,

Check in ArcGISPro > settings> add-in manager at options tab, make sure it is load all add-in without restrictions and try with your visual studio again.

Below is the link describe about detail.

https://github.com/esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-Registry-Keys

0 Kudos
BenRalph
New Contributor II

Thanks for the idea, but this did not solve it for me.

0 Kudos
GhislainPrince
Esri Contributor

Hi ben,

 i think your add-in may not be following the expected folder structure.  Review step3 in the embedding toolboxes add-in doc. Your toolbox should go under Toolboxes/toolboxes along with (optional) other folders.

Below is the directory structure for the add-in i created.

cheers

\---Toolboxes

    +---arcpy
    |       DeepThought.py
    |
    +---help
    |   \---gp
    |       |   Answer_deepthought.xml
    |       |   deepthought_toolbox.xml
    |       |
    |       +---messages
    |       |       messages.xml
    |       |
    |       \---toolboxes
    |               DeepThought.xml
    |
    \---toolboxes
            answer.py
            DeepThought.tbx
            sixbynine.py
 
BenRalph
New Contributor II

Fantastic!  Thank you for taking the time to test and reply. The 'toolboxes' sub-directory was indeed missing. I'll admit that I gave up on Step3 after some confusion. 

Cheers.

0 Kudos