HOW TO

Create and store a custom Python system toolbox in ArcGIS Pro

Last Published: April 25, 2020

Summary

The instructions provided describe to create a Python toolbox and store it as a system toolbox in ArcGIS Pro, easily accessible for any project through the Geoprocessing pane, and intended for all users.

Note:
The web help document, ArcGIS Pro: Adding toolboxes in Python describes how to add a Python toolbox in ArcGIS Pro. The article also mentions the a Python toolbox can be stored as a system toolbox in ArcGIS Pro, however, the document does not provide any instructions on how to do so.

Procedure

  1. In the Catalog pane in ArcGIS Pro, right-click the designated project folder and select New > Python Toolbox.
Photo of creating a Python toolbox from the Catalog pane.
Note:
The Catalog pane is called the Project pane in ArcGIS Pro prior to version 2.0.
  1. Add desired tools into the toolbox.
Photo of add new toolbox window.
  1. Edit the toolbox in a Python IDE environment, by right-clicking toolbox > Edit. This opens the Python toolbox script in a text editor, for example, Notepad.
Photo of editing toolbox.
  1. Find the class Toolbox(object): section of the script.
  2. Set self.label and self.alias equal to the chosen name for the toolbox. The following code snippet shows the sample of what the final script looks like.
class Toolbox(object):
    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "ToolboxTest1"
        self.alias = "PythonToolbox"
  1. Save and close the script.
  2. In Windows Explorer, navigate to the folder where the toolbox is stored.
  3. Copy the toolbox file and its accompanying XML document(s) and paste into the following file path:
C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Toolboxes

Article ID: 000013549

Software:
  • ArcGIS Pro

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options