Script tool parameters

426
1
Jump to solution
08-27-2012 09:40 AM
JonPedder
Occasional Contributor II
This is my first foray into the ToolValidator class so this might be a very basic issue.

I???d like to read in a list of values from a list and display them as selectable in the script dialog as selectable options

Example:
Parameters in the script tool
[0] = name of mxd (required, arcmapdocument)
[1] = values (required, string, multivalue, filtered)

Can I assign a list such as
vals = [1,2,3,4,5,6,7]
self.params[1] = vals

In the end I???d like this to pull data from a featureclass using a searchcursor but for now I???m trying to see if it will even take the basic list of values.

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RaphaelR
Occasional Contributor II
hi jon,

the help topic for the tool validator has a part about adding and filtering valuelists for script tool parameters:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000000v000000.htm

View solution in original post

0 Kudos
1 Reply
RaphaelR
Occasional Contributor II
hi jon,

the help topic for the tool validator has a part about adding and filtering valuelists for script tool parameters:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000000v000000.htm
0 Kudos