Save Toolbox To Version (Data Management)

Summary

Analyzes and saves a toolbox for use with a specific version of ArcGIS software.

The analyzers check for a variety of geoprocessing tool compatibility issues between the installed version of ArcGIS Pro and a specified target version. For a list of compatibility issues, see the Analyze Toolbox For Version tool, as it uses the same analyzer logic.

Learn more about saving a toolbox to a previous version

The tool's analyzers will report compatibility issues with both ModelBuilder and Python-based tools (only for script tools with a Python file as the tool's source). The following are distinctions on the actions that will be performed:

  • Model tool—Certain types of compatibility issues will be addressed as part of the operation.
  • Script tool—No change is made to the tool's source file.

Usage

  • This tool creates an output toolbox where the result will be written. The original toolbox will not be modified. It is recommended that you keep the original toolbox to avoid data loss.

  • The tools in the output toolbox may produce results that are not consistent with the original. Test the tools in the output toolbox for consistency.

  • Some functionality in models, particularly related to filters, domains, and choice lists (value drop-down lists), will be removed from the output toolbox. To fix this, add and reconnect the relevant tools to the model's workflow.

  • For script tools, the path to the tool's Python file will not be changed in the output toolbox. The script tools in the original and output toolboxes will use the same file. If modifications are required, make a copy of the .py file and update one of the two script tool's Script file properties to point at the second .py file. This does not apply to script tools with an embedded script file.

  • Certain compatibility issues cannot be repaired by this tool. For example, data types that are not present at the target version will produce an error. To address this, make a copy of the toolbox, manually remove the problematic data, and use that toolbox as input.

Parameters

LabelExplanationData Type
Input Toolbox

The input toolbox (.tbx or .atbx file) that will be analyzed and saved. The file will not be modified.

The Python toolbox format (.pyt file) is not supported as an input.

Toolbox
Target Version

Specifies the software version that will be used for toolbox compatibility issue analysis.

  • 10.6.0ArcGIS Desktop 10.6.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 10.7.0ArcGIS Desktop 10.7.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 10.8.0ArcGIS Desktop 10.8.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 10.8.2ArcGIS Desktop 10.8.2 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.2ArcGIS Pro 2.2 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.3ArcGIS Pro 2.3 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.4ArcGIS Pro 2.4 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.5ArcGIS Pro 2.5 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.6ArcGIS Pro 2.6 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.7ArcGIS Pro 2.7 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.8ArcGIS Pro 2.8 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.9ArcGIS Pro 2.9 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 3.0ArcGIS Pro 3.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
String
Output Toolbox

The toolbox that will be created for use with ArcGIS software of the specified Target Version parameter value.

Toolbox
Error on missing tool
(Optional)

Specifies whether an error will be produced if a tool is encountered that is not present at the target version.

  • Checked—An error will be produced and the output toolbox will not be created. This is the default.
  • Unchecked—A warning message will be produced and the output toolbox will be created. For model tools, the problematic tool will be removed from the model, which will require manual editing.
Boolean
Error on missing required parameter
(Optional)

Specifies whether an error will be produced if a parameter is encountered that is not present at the target version and that parameter has a value that is not its default value.

  • Checked—An error will be produced and the output toolbox will not be created. This is the default.
  • Unchecked—A warning message will be produced, the parameter will be removed from the model, and the output toolbox will be created.
Boolean
Error on invalid parameter value
(Optional)

Specifies whether an error will be produced if a parameter value is encountered that is not present in its parameter filter at the target version.

  • Checked—An error will be produced and the output toolbox will not be created. This is the default.
  • Unchecked—A warning message will be produced and the output toolbox will be created. The output toolbox will produce an error if it has a value that is not in domain or is invalid.
Boolean

arcpy.management.SaveToolboxToVersion(in_toolbox, version, out_toolbox, {missing_tool}, {missing_param}, {invalid_param_value})
NameExplanationData Type
in_toolbox

The input toolbox (.tbx or .atbx file) that will be analyzed and saved. The file will not be modified.

The Python toolbox format (.pyt file) is not supported as an input.

Toolbox
version

Specifies the software version that will be used for toolbox compatibility issue analysis.

  • 10.6.0ArcGIS Desktop 10.6.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 10.7.0ArcGIS Desktop 10.7.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 10.8.0ArcGIS Desktop 10.8.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 10.8.2ArcGIS Desktop 10.8.2 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.2ArcGIS Pro 2.2 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.3ArcGIS Pro 2.3 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.4ArcGIS Pro 2.4 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.5ArcGIS Pro 2.5 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.6ArcGIS Pro 2.6 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.7ArcGIS Pro 2.7 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.8ArcGIS Pro 2.8 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 2.9ArcGIS Pro 2.9 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
  • 3.0ArcGIS Pro 3.0 will be used for toolbox compatibility issue analysis. The output toolbox will be saved to this version.
String
out_toolbox

The toolbox that will be created for use with ArcGIS software of the specified version parameter value.

Toolbox
missing_tool
(Optional)

Specifies whether an error will be produced if a tool is encountered that is not present at the target version.

  • ERROR_ON_MISSING_TOOLAn error will be produced and the output toolbox will not be created. This is the default.
  • WARN_ON_MISSING_TOOLA warning message will be produced and the output toolbox will be created. For model tools, the problematic tool will be removed from the model, which will require manual editing.
Boolean
missing_param
(Optional)

Specifies whether an error will be produced if a parameter is encountered that is not present at the target version and that parameter has a value that is not its default value.

  • ERROR_ON_MISSING_REQUIRED_PARAMAn error will be produced and the output toolbox will not be created. This is the default.
  • WARN_ON_MISSING_REQUIRED_PARAMA warning message will be produced, the parameter will be removed from the model, and the output toolbox will be created.
Boolean
invalid_param_value
(Optional)

Specifies whether an error will be produced if a parameter value is encountered that is not present in its parameter filter at the target version.

  • ERROR_ON_INVALID_PARAM_VALUEAn error will be produced and the output toolbox will not be created. This is the default.
  • WARN_ON_INVALID_PARAM_VALUEA warning message will be produced and the output toolbox will be created. The output toolbox will produce an error with a value that is not in domain or is invalid.
Boolean

Code sample

SaveToolboxToVersion example 1 (Python window)

The following Python window script demonstrates how to use the SaveToolboxToVersion function in immediate mode.

import arcpy
arcpy.management.SaveToolboxToVersion(r"C:\toolboxes\MyTools.atbx", "2.7", "C:\toolboxes\MyTools_27.tbx")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics