I am working on a python based script/tool. I would like to make use of drop down lists for several of the parameters. This is very easy to do if the lists are just plain old strings.
Does anyone know if it is possible to bind objects to this list and display a certain property? Objects will be very simple; just key-value pairs.
So, I would like to display the key and be able to access the value somewhere in the ToolValidator, or better yet access the ToolValidator class from the tool script itself?
Answer
Since you know that you can provide a potential list of acceptable values to a tool parameter, you could try using the selected value from the domain, as the key to a dictionary residing in your main script.
No comments:
Post a Comment