ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Analyze Tools For Pro

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Analyzes Python scripts and custom geoprocessing tools and toolboxes for functionality that is not supported in ArcGIS Pro.

There are differences between ArcGIS Pro and ArcGIS 10.x that may mean changes to some custom tools and scripts so they run successfully in ArcGIS Pro. These changes include geoprocessing tools and environments that are not supported in ArcGIS Pro, the replacement of the arcpy.mapping module with the arcpy.mp module, unsupported data formats (such as a personal geodatabase), and an upgrade to Python 3.4 from Python 2.7.

Usage

  • Any issues identified will be included in the tool messages as warnings.

  • ArcGIS Pro uses Python 3.4. While many scripts may continue to work as is, others will not. For tips in updating Python scripts to work in ArcGIS Pro, see Python 3 migration.

  • For Python 2 to Python 3 issues, Analyze Tools For Pro uses the Python 2to3 utility to review Python code. The Python 2to3 utility can be used to review Python 2.x code against a series of fixers that show how the code can be transformed to valid Python 3.x code.

  • The Python 2to3 utility can be used directly from the command prompt and has a rich set of options for analyzing Python code that are not available through Analyze Tools For Pro, such as applying only specific fixers or updating the code in place. For more information, see https://docs.python.org/2/library/2to3.html.

Syntax

AnalyzeToolsForPro_management (input, {report})
ParameterExplanationData Type
input

The input can be a geoprocessing toolbox, Python file, or a tool name.

Note:

If a tool name is specified, the tool will need to be loaded first using the arcpy.ImportToolbox function to be recognized. Tool names should include the toolbox alias.

File; String
report
(Optional)

An output text file that includes all issues.

File

Code sample

Code example 1

Analyze a Python script for ArcGIS Pro.

import arcpy
arcpy.AnalyzeToolsForPro_management('c:/tools/scripts/myutils.py', 'c:/temp/analyze_report.txt')

print(arcpy.GetMessages(1))
Code example 2

Analyze a geoprocessing toolbox for ArcGIS Pro.

import arcpy
arcpy.AnalyzeToolsForPro_management('c:/tools/scripts/mytools.tbx', 'c:/temp/analyze_report.txt')

print(arcpy.GetMessages(1))
Code example 3

Analyze a geoprocessing tool for ArcGIS Pro. To analyze a tool, first import the toolbox using ImportToolbox, and then pass in the tool name with an alias to AnalyzeToolsForPro.

import arcpy

arcpy.ImportToolbox('c:/tools/scripts/mytools.tbx')
arcpy.AnalyzeToolsForPro_management('mytool_tools', 'c:/temp/analyze_report.txt')

print(arcpy.GetMessages(1))

Environments

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the General toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal