In an ArcGIS Toolbox script tool, how can I get the default value for one parameter to be derived from the value of another parameter?

GPX To Features does this, but I haven't been able to figure out how. There is logic under Tool >> Properties >> Validation to sanitize the filename but nothing about setting a default value. I've copied the validation code verbatim into my tool but that doesn't work.

GPX to Features tool dialog with derived value shown Tool validation code

1 Answer 1


This has had me spinning my wheels on and off for years. I didn't see what was wrong because I was always looking a layer deeper, into the code of the validation class and in the script.

The solution is simple: Remember to set the direction of the output parameter!

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.