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...

What is a script tool?

  • Creating the toolbox
  • Creating script tools in a toolbox

Creating a script tool allows you to turn your own Python scripts and functionality into your own geoprocessing tools—tools that look and act like system geoprocessing tools. Once created, a script tool provides many advantages:

  • A script tool that you create is an integral part of geoprocessing, just like a system tool—you can open it from the Search or Catalog window, use it in ModelBuilder and the Python window, and call it from another script.
  • You can write messages to the Results window and progress dialog box.
  • Using built-in documentation tools, you can provide documentation.
  • When the script is run as a script tool, arcpy is fully aware of the application (such as ArcMap) it was called from. Settings made in the application, such as arcpy.env.overwriteOutput and arcpy.env.scratchWorkspace, are available from ArcPy in your script tool.

To create a script tool in a custom toolbox, you need three things:

  • A script
  • A custom toolbox
  • A precise definition of the parameters of your script

Creating the toolbox

A custom toolbox can be created by right-clicking the folder or geodatabase in which you want to create the new toolbox, then click New > Toolbox.

Creating script tools in a toolbox

To create a script tool, right-click your toolbox, and click Add > Script. This opens the Add Script wizard which takes you step by step through the process of creating a script tool. After completing the steps, your toolbox will contain a new script tool. You can always modify the properties names and data types of this script tool by right-clicking the script tool and choosing Properties.

To learn more about adding a script tool, see Adding a script tool.

Related Topics

  • A quick tour of creating tools with Python
  • Comparing custom and Python toolboxes
Feedback on this topic?

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
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal