DEV Community

Diogo Rosanelli
Diogo Rosanelli

Posted on

ArcGIS Toolbox Reload

If you are a developer in the ArcGIS universe, have you ever had to develop a tool using a Python Toolbox (.pyt), and came across a problem: when updating the source code of your tool, you had to close ArcGIS Pro and open it again for the updates to be made.

The ArcGIS environment uses the compiled version of Python codes (.pyc), and therefore references need to be reloaded explicitly within the source code, and you can do this through the importlib library that reloads the reference for your module, and it is then updated without that you may need to restart ArcGIS Pro to test changes to your code.

Image description

Have you ever experienced this situation? What do you think of this resource? Did you already know this code tip? Leave a comment...

DEV #PYTHON #ARCGIS #ESRI #RELOAD #MODULE #PYT #PYC #TOOLBOX

Top comments (0)