Python Script Tool Validation Parameters

07-09-2012 08:55 AM
New Contributor
Hi Everyone.

I'm fairly new to python/ArcGIS script tools, so I was hoping I could find an easy/ straightforward example...
I need the user of tool to select an input parameter in a script tool from Dropdown List populated with 5 or 6 default string values.

I'm sure this is a very simple task, but I can't seem to find any straight forward examples online or in esri help that are this simple.

I know that this has to be set in the tool Properties > Validation > Edit the Validation Script.

Anybody have any insight on how I should write the function so that I get a very simple list of strings to choose from?


Tags (2)
0 Kudos
1 Reply
Regular Contributor III
If its a hardcoded list that doesn't need to change based on other parameters, you dont need to use the Validator.

On the Parameters tab of your script tool, add a new input of type string.
For its properties, chose Value List for the Filter.
In the window that opens, add your strings one-by-one.
0 Kudos