Wednesday, July 27, 2016

Creating Custom Tools

This week, we created a custom toolbox and modified a script tool to go with it.


Here is what the script tool dialog box looks like.

Here is what the tool dialog window looks like after using .AddMessages() in the script.

Here is a list of the basic steps required to make a custom toolbox and script tool.
1.       Create/modify a python script.
2.       Create a custom toolbox.
3.       Add your script tool to the custom toolbox using Add>Script after right-clicking toolbox.
4.       Set the parameters of the tool in the properties to match your script.
5.       Edit your script if necessary by setting the parameters of the script using arcpy.GetParameter()
6.       Modify print statements to arcpy.AddMessage() statements to ensure messages appear in the geoprocessing environment tool dialog box.
7.       Share your toolbox, tool, and script by compressing your script and parent toolbox into a compressed (zip) folder.


No comments:

Post a Comment