How do I disable the entire feature set parameter via tool validation?

3346
7
Jump to solution
10-19-2015 04:18 PM
RoySP
by
New Contributor III

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?

0 Kudos
1 Solution

Accepted Solutions
RoySP
by
New Contributor III

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..

View solution in original post

7 Replies
DanPatterson_Retired
MVP Emeritus
RoySP
by
New Contributor III

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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

I think the operative portion of the validation section in the link is...

  • The part that you can do by adding code.
  • The part that ArcGIS does automatically for you. This part of validation is referred to as internal validation (or basic validation), since it is the basic validation done internally by geoprocessing in ArcGIS.

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

0 Kudos
RoySP
by
New Contributor III

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

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

curtvprice
MVP Esteemed Contributor

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.

0 Kudos
RoySP
by
New Contributor III

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..