I have a tool I am writing that takes in a multiple parameters. The last of these, Codenumber, I want to define to be 1,2,3 or 4. I am attempting to do this by use of a Value List. See below section of my code;
outFC_location = arcpy.GetParameterAsText(0)end1_Easting = float(arcpy.GetParameterAsText(1))end1_Northing = float(arcpy.GetParameterAsText(2)) end2_Easting = float(arcpy.GetParameterAsText(3))end2_Northing = float(arcpy.GetParameterAsText(4))fcName = (arcpy.GetParameterAsText(5))Codenumber = arcpy.Parameter( displayName = "Code Number", datatype = "float" parameterType = "Required" direction = "Input" multiValue = False)#Set a list of possible values for runway code.Codenumber.filter.type = "Valuelist"Codenumber.filter.list = ["1","2","3","4"]In the script's properties, under "Parameters", I am unable to set "Value" as described here; https://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/value-list-filter.htm
The only fields I can see under "Parameters" are Display Name and Data Type. When running the tool, the input for Codenumber shows no list of inputs.
What is the error in my code or my approach?
أكثر...
outFC_location = arcpy.GetParameterAsText(0)end1_Easting = float(arcpy.GetParameterAsText(1))end1_Northing = float(arcpy.GetParameterAsText(2)) end2_Easting = float(arcpy.GetParameterAsText(3))end2_Northing = float(arcpy.GetParameterAsText(4))fcName = (arcpy.GetParameterAsText(5))Codenumber = arcpy.Parameter( displayName = "Code Number", datatype = "float" parameterType = "Required" direction = "Input" multiValue = False)#Set a list of possible values for runway code.Codenumber.filter.type = "Valuelist"Codenumber.filter.list = ["1","2","3","4"]In the script's properties, under "Parameters", I am unable to set "Value" as described here; https://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/value-list-filter.htm
The only fields I can see under "Parameters" are Display Name and Data Type. When running the tool, the input for Codenumber shows no list of inputs.
What is the error in my code or my approach?
أكثر...