I have created a simple script tool which has a single parameter of type "String". I have written the tool validation to disable the input field (simply trying to learn tool validation). The validator code is as follows:
class ToolValidator: def __init__(self): import arcpy self.params = arcpy.GetParameterInfo() def initializeParameters(self): self.params.Enabled = 0 return def updateParameters(self): return def updateMessages(self): return
Unfortunately, when I open the tool, the field is not disabled (as I expect it should be). Any ideas what I'm missing?
SOLUTION: In case it's not clear in the threads below. The solution to the issue was to change Enabled to enabled, which is a case change between ArcGIS 9.3 and 10.0. This capitalization works correctly both in the initializeParameters method and the updateMessages method.