Renaming a tool: name and label

Tools have both a name and label property. You can change the label of a tool by right-clicking the tool in the Catalog or ArcToolbox window and clicking Rename. Renaming a tool does not change the tool name, only the label.

Within a toolbox, you cannot have tools with the same name or label, even if they are in different toolsets.

Tool label

The tool label is what is displayed in the Catalog window, ArcCatalog, and the ArcToolbox window. If you right-click a tool and click Rename, you are changing the tool label. The label may contain spaces.

Tool name

The tool name is used in scripting. For example, below is a code snippet that executes the Add Field tool. Note that the tool name (AddField) is used, not the label (Add Field), and the name does not contain spaces or special characters.

# Run the Add Field tool
arcpy.AddField_management("c:/data/streets.shp", "Address", "TEXT", "", "", 120)

NoteNote:

The name can only be changed by right-clicking the tool and clicking Properties.

Tool name conventions

The convention used by ArcGIS is that each word of the tool label is capitalized, and the tool name should be the same as the label but without the spaces. If, after removing spaces, the tool name is rather long to type, it can be further shortened. Here are a few examples of this convention, taken from the system tools:

Tool label

Tool name

Feature To Line

FeatureToLine

Add XY Coordinates

AddXY

Update Annotation Feature Class

UpdateAnnotation

Symmetrical Difference

SymDiff

Tool names and labels

Related Topics

10/29/2012