Tuesday, October 26, 2010

Assigning Alias to Custom Toolboxes

I create lots of custom scripts and toolboxes to help out with various tasks, and I noticed the following message the other day when I exported a script from model builder to python:
# Warning: the toolbox toolbox.tbx DOES NOT have an alias.
# Please assign this toolbox an alias to avoid tool name collisions
# And replace arcpy.gp.toolname(...) with arcpy.toolname_ALIAS(...)

Basically, the system is asking for an Alias to provide an additional unique identifier because tools within the same toolbox cannot have the same name, but tools in other toolboxes can have the same name. 

To define an alias, open ArcCatalog and right click on the tbx file.  Select properties, you'll see this:

Enter in an alias and press ok.

That easy!
Enjoy