AnsweredAssumed Answered

ArcGIS Pro: python module

Question asked by WIGeoGISAT on Feb 13, 2015
Latest reply on Nov 9, 2017 by exelis_test

Has anyone already tried to extend ArcGIS Pro 1.0 with a python module? I have done this more or less successfully, but some things really do not work. Here some experiences and questions:

 

Generally I followed the ESRI help: Extending geoprocessing through Python modules—Geoprocessing and Python | ArcGIS for Professionals 

 

Module distribution really annoying:

It is not possible to distribute the site-package via windows installer, because the ArcGIS Pro Python installation is not found in the windows registry. So there is one workaround: copy the site-package to following path: C:\Program Files\ArcGIS\Pro\bin\Python\Lib\site-packages

This is annoying, but works. Is there a more elegant way to distribute the site-package to the arcgis pro python installation?

 

Toolbox integration

OK, having done this, after opening ArcGIS Pro everything is working. Through Python window I can import the module, I can use the tools in my module and the tools of my python-toolbox as well as the language specific help texts, but how can I add the toolbox to the project? In ArcMap the toolboxes of the python modules are listed automatically in the system-toolbox directory. In ArcGIS Pro the only way I found out to add the toolbox is to go choose the "Add Toolbox..." function and to step through this long path to get the toolbox: C:\Program Files\ArcGIS\Pro\bin\Python\Lib\site-packages\packagename\esri\toolboxes\...

After having done this, everything works fine, but I did not find out how it is possible to store the custom toolbox as default to the system-toolboxes, so that I do not have to load the toolbox again and again opening a new blank project. Is there a way to define the custom toolbox to be loaded by default to every new project?  

Outcomes