At the script tool properties, same place you set the parameters, source pathname to the py script, etc., there's also a Validation tab...if you click the 'edit' button, the ToolValidator class code will be opened which you'll need to modify.For example, I did some minimal modifications implementing an script tool to update connection properties to layers and made the tool interface to allow selection of any of several SDE connections -- the idea or objective was to aid in cutting down processing time if the user already knew what types of connections existed in the current map doc (so no need to go searching for any not checked off in the tool)...I implemented this at 10.0, and here's how it appears - notice how little I needed to modify (you'll need to compare to the originally loaded code) - I needed change the 'list' in the initializeParameters function and for default checked on I also kept 3 connections checked by default by altering the updateParameters function (for those users unsure what to check on or off):
class ToolValidator:
"""Class for validating a tool's parameter values and controlling
the behavior of the tool's dialog."""
def __init__(self):
"""Setup arcpy and the list of tool parameters."""
import arcpy
self.params = arcpy.GetParameterInfo()
def initializeParameters(self):
"""Refine the properties of a tool's parameters. This method is
called when the tool is opened."""
self.params[0].filter.list = ['MonroeGISData', 'MonroeRasterData', 'MCPA', 'MonroeAddressing']
return
def updateParameters(self):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parmater
has been changed."""
if not self.params[0].altered:
self.params[0].value = r"'MonroeGISData';'MonroeRasterData';'MCPA'"
return
def updateMessages(self):
"""Modify the messages created by internal validation for each tool
parameter. This method is called after internal validation."""
return
Almost forgot - you will probably need this (the 10.2 webhelp for this class):Programming a ToolValidator classDesktop » Geoprocessing » Creating tools » Creating tools with Python » Creating script tools in a custom toolboxhttp://resources.arcgis.com/en/help/main/10.2/index.html#//00150000000v000000Scroll down to the heading 'filter object' - this is what I used, setting on the Parameters tab a multivalue input param defined by a Value List.Wayne