Label | Explanation | Data Type |
Input Toolbox
| The input toolbox (.tbx or .atbx) that will be analyzed and saved. The file will not be modified. The Python toolbox (.pyt) format is not supported as an input. | Toolbox |
Target Version
| Specifies the software version that will be used for toolbox compatibility issue analysis.
| 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 the operation will produce an error if a tool is encountered that is not present at the target version.
| Boolean |
Error on missing required parameter (Optional) | Specifies whether the operation will produce an error 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.
| Boolean |
Error on invalid parameter value (Optional) | Specifies whether the operation will produce an error if a parameter value is encountered that is not present in its parameter filter at the target version.
| Boolean |
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 that 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 toolbox 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
arcpy.management.SaveToolboxToVersion(in_toolbox, version, out_toolbox, {missing_tool}, {missing_param}, {invalid_param_value})
Name | Explanation | Data Type |
in_toolbox | The input toolbox (.tbx or .atbx) that will be analyzed and saved. The file will not be modified. The Python toolbox (.pyt) format is not supported as an input. | Toolbox |
version | Specifies the software version that will be used for toolbox compatibility issue analysis.
| 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 the operation will produce an error if a tool is encountered that is not present at the target version.
| Boolean |
missing_param (Optional) | Specifies whether the operation will produce an error 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.
| Boolean |
invalid_param_value (Optional) | Specifies whether the operation will produce an error if a parameter value is encountered that is not present in its parameter filter at the target version.
| Boolean |
Code sample
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
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes