Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

ToolValidator Class - New methods allowed?

$
0
0
Has anyone tried adding new methods or classes to the ToolValidator code for a Python script tool?

I wanted to call another function from 'updateParameters' and use the return values to populate one of the parameter choice lists, but I'm getting the following error message: "global name 'CreateValueList' is not defined".

I placed my 'CreateValueList' method within the ToolValidator class. If I have to I can put the code within 'updateParameters', but it would be nicer if it were in a method by itself. Can I do it within a second class?

Thanks for any suggestions!

Viewing all articles
Browse latest Browse all 2485

Trending Articles