I wondered whether it is possible to create a Python Toolbox with a slider for GPDouble-type user input? I have found nothing so far.
Currently, the parameter in my Toolbox script is limited to the range between -1 and 1 by setting
parameter.filter.type = "GPDouble"
parameter.filter.list = [-1, 1]
but the result is simply a user input field for numeric values. If user input is outside the given range, ArcMap shows an error message to indicate the issue. However, it would be better if there was just a slider that limits possible user input right away.
Solved! Go to Solution.
There are no sliders for Pro tools, either python or custom. You would have to put the check in your validation script or within the calling script by clipping the range
if -1 < x or x > 1:
There are no sliders for Pro tools, either python or custom. You would have to put the check in your validation script or within the calling script by clipping the range
if -1 < x or x > 1:
https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/parameter-controls.htm
param3.controlCLSID='{C8C46E43-3D27-4485-9B38-A49F3AC588D9}'
param3.value=60
# Set an acceptable range of 1 to 99
param3.filter.type = "Range"
param3.filter.list = [1, 99]
nice - thanks for posting this, it appears this functionality was introduced in 3.1, which was released after the accepted answer, so that was correct at the time, but is not correct anymore.