AnsweredAssumed Answered

ToolValidator Class - New methods allowed?

Question asked by speaslee on Jul 27, 2013
Latest reply on Jul 28, 2013 by lpinner
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!

Outcomes