I am creating a python tool and am trying to create a similar parameter to the input in the Buffer Tool for Distance [value or field]. I would like a drop down that has the options for Linear Unit or Field.
I have replicated the parameter data types the same way the Buffer Tool has them but it still does not work the way I want inside of my own tools GUI. Any recommendations as to how to accomplish this?
I think you may have to set up a field parameter, a unit parameter, and a toggle parameter, then use the tool validation page to set up the toggle to work correctly.
Then, within your tool, you can just check the toggle to choose which parameter to use.
Thats what I was thinking, but I was hoping there was another way. I tried dynamically modifying the .datatype in Tool Validation but that's not possible.
I was hoping to get the GUI to look exactly like the Buffer Distance parameter but I guess that isn't possible with python tools.