Consolidate Toolbox (Data Management Tools)
Summary
Consolidates one or more toolboxes into a specified output folder.
Usage
Tools and parameters may have been added or modified between the ArcGIS Pro version installed and the version specified for the Version parameter. The consolidation process will analyze the tool's properties in the current version and those in the target version and return warnings or errors. Review the warnings or errors carefully as they can indicate that the tool may produce different outputs.
Parameters
Label
Explanation
Data type
Toolbox
The toolboxes that will be consolidated.
Toolbox
Output Folder
The output folder that will contain the consolidated toolbox.
If the specified folder does not exist, a folder will be created.
Folder
Version
(Optional)
Specifies the target ArcGIS Pro version of the consolidated toolbox. Specifying a version allows toolboxes to be used in previous versions of ArcGIS.
Current version —The consolidated folder will contain tools compatible with the current version of the ArcGIS Pro release. This is the default.
ArcGIS Pro 2.2 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.2.
ArcGIS Pro 2.3 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.3.
ArcGIS Pro 2.4 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.4.
ArcGIS Pro 2.5 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.5.
ArcGIS Pro 2.6 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.6.
ArcGIS Pro 2.7 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.7.
ArcGIS Pro 2.8 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.8.
ArcGIS Pro 2.9 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.9.
ArcGIS Pro 3.0 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.0.
ArcGIS Pro 3.1 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.1.
ArcGIS Pro 3.2 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.2.
ArcGIS Pro 3.3 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.3.
ArcGIS Pro 3.4 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.4.
ArcGIS Pro 3.5 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.5.
ArcGIS Pro 3.6 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.6.
ArcGIS Pro 3.7 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.7.
String
arcpy.management.ConsolidateToolbox(in_toolbox, output_folder, {version})
Name
Explanation
Data type
in_toolbox
[in_toolbox,...]
The toolboxes that will be consolidated.
Toolbox
output_folder
The output folder that will contain the consolidated toolbox.
If the specified folder does not exist, a folder will be created.
Folder
version
(Optional)
Specifies the target ArcGIS Pro version of the consolidated toolbox. Specifying a version allows toolboxes to be used in previous versions of ArcGIS.
CURRENT —The consolidated folder will contain tools compatible with the current version of the ArcGIS Pro release. This is the default.
2.2 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.2.
2.3 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.3.
2.4 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.4.
2.5 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.5.
2.6 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.6.
2.7 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.7.
2.8 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.8.
2.9 —The consolidated folder will contain tools compatible with ArcGIS Pro version 2.9.
3.0 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.0.
3.1 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.1.
3.2 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.2.
3.3 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.3.
3.4 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.4.
3.5 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.5.
3.6 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.6.
3.7 —The consolidated folder will contain tools compatible with ArcGIS Pro version 3.7.
String
Code sample
ConsolidateToolbox example 1 (Python window)
The following Python window script demonstrates how to use the ConsolidateToolbox function in the Python window.
import arcpy
arcpy.management.ConsolidateToolbox(r'C:\data\BufferPoints.tbx',
r'C:\project\Buffer_Pnts', "CURRENT")
ConsolidateToolbox example 2 (stand-alone script)
Find and create individual consolidated folders for all of the toolboxes that reside in a specified folder.
# Name: ConsolidateToolboxEx2.py
# Description: Find all the toolboxes that reside in a specified folder and
# create a consolidated folder for each.
# import system modules
import os
import arcpy
# Set environment settings
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:/Toolboxes"
# Loop through the workspace, find all the toolboxes (.tbx), and create a
# consolidated folder for each toolbox found using the same name as the original
# toolbox.
for tbx in arcpy.ListFiles("*.tbx"):
print(f"Consolidating {tbx}")
arcpy.management.ConsolidateToolbox(tbx, os.path.splitext(tbx)[0], "CURRENT")
Environments
This tool does not use any geoprocessing environments.
Licensing information
Basic: Yes
Standard: Yes
Advanced: Yes