I am using tool validation to enable/disable parameters based on a boolean.
One of the parameters I want to disable is a feature set.
However, the input parameter disables but the actual interactive portion that allows you to draw a feature on the map is not disabled. How do I get that to disable as well?
Solved! Go to Solution.
Got an update from Esri
It turns out that this is a previously documented issue. Does not look like there is any urgency on resolving this...
NIM088333 - Script tool validation does not allow a feature se..
Do this depend upon a prior parameter? Understanding validation in script tools—Help | ArcGIS for Desktop
Hi Dan,
Yes. A boolean parameter triggers the disabling.
In the screenshot, when I check the "Buffer by selecting an existing feature" check box, I want the entire "Draw Input Selection Polygon" portion to be disabled. Right now, it does not disable the part which allows you to draw a polygon.
It is almost like there are two parameters in the first parameter but only one of them disables.
I hope this makes sense.
I think the operative portion of the validation section in the link is...
Which I think means that you will have to right the code to disable the listbox if the checkbox is toggled on.
Then you get into this section... Customizing script tool behavior—Help | ArcGIS for Desktop
Hi Dan,
Yes that is exactly what I did.
My code is below
However, the issue is it only disables the text box where you see the parameter "COIBuffer::Draw_Input_Selection_Polygon" that is grayed out, but does not disable the portion which allows you to draw the polygon as shown below.
And I dont see how to disable that because the text box and the portion which allows you to draw the polygon seem to be part of one parameter of type Feature Set
That's what I am not clear on... It is almost like you can use an existing selection or all... but then you enable to select another feature(s) using an input selection polygon (or not). Why have you opted for that route instead of using an existing feature selection or working with all of them. It is kind of like... if they forget to make a selection, then you allow them to make one then... That is fine and maybe a programming preference. My preference would be ... use an existing selection or use them all...if they want to make a selection, then bail the tool, go back and make the selectionand and run the tool again. It simplifies the programming and makes people read the help file and understand what they are doing. I can't see anything other than the order of the parameters you have being out of a different order than I would have put them, but I don't know if that affects the updating (but I doubt it, unless there is a 'listening' parameter that there is in some gui programming options) Good luck...Others should weigh in
I agree I would just skip this parameter and let the user do a selection themselves. This allows them to do the selection using a variety of techniques, and all modify the selection before running the tool.
Got an update from Esri
It turns out that this is a previously documented issue. Does not look like there is any urgency on resolving this...
NIM088333 - Script tool validation does not allow a feature se..