Unable to update ToolValidator

731
2
09-19-2011 01:49 PM
MikeMazerolle
New Contributor
I have attempted to update the Tool Validator (ArcGIS 10.0) code as per the instructions within the Help file. However, it is not behaving as expected. When I choose the option to "Edit" on the Validation tab of the Properties dialog, IDLE will open with a file called "xxScript.py", which is created in a temp folder under my user profile. I made changes in this file and saved (as per the ESRI Instructions), but when I apply the changes I get nothing. And when attempting to edit it again, it simple created a new copy called "xxScript2.py", which was a copy of the original.

Is there a place/naming convention I should be saving this file after modifying so that it can be referenced?
Tags (2)
0 Kudos
2 Replies
HenryColgate
Occasional Contributor
This temporary xxScript.py is fine.

What you need to do is open the Properties, select validation and then Edit.  From this point do not close the Properties window as it seems to break a link between the xxScript.py file that is open and the properties.

Then edit the Python script and save it.  Then you can press Apply in the properties window.  If you press apply before saving it will fail and break the link so if you save later and Apply it will show no change.

Also once you have pressed Apply once it seems to break the link so to edit you have to open a new edit session and this will probably be xxScript2.py or some such.  I'm up to about xxScript40.py at the moment.  It is kind of a work around because I don't think it works as well as it could but it should work as long as you proceed like this.
0 Kudos
MikeMazerolle
New Contributor
Thanks DrColgate! This worked. I think I was hitting Apply and then OK, which was probably why it was failing. I'm unsure now, bit clicking OK immediately after updating and saving, seemed to do the quick.
0 Kudos