Select to view content in your preferred language

Python Toolbox Parameter Issue

513
1
07-20-2022 02:29 PM
tzz_12
by
New Contributor III

I developed a python script tool in ArcGIS Pro that I would like to convert into a Python Toolbox tool. All the tool's parameters seem to work, except for the Snap Distance parameter. Every time I try to input a value into the Snap Distance's field box, it would disappear after I move onto the next input field. Here is the script for the parameter: 

param5 = arcpy.Parameter(
displayName="Guage Snap Distance",
name="tolerance",
datatype="GPDouble",
parameterType="Optional",
direction="Input")
param5.filter.type = "ValueList"
param5.filter.list = [100,300,700]

What are some possible reasons the entered input is disappearing? Is it related to my script or something else I should edit in the python toolbox? 

Thanks for your help!

0 Kudos
1 Reply
DonMorrison1
Occasional Contributor III

Can you include the entire .pyt file? My guess is there there is something happening in the toolbox functions (eg updateParameters) that is causing that.  Also please format the code

0 Kudos