Original User: davisam1Hi All,I am working on a python script and I would like the user to be able to change the values that get reclassed. If I hard code the remap fields into the code then the program does what it is supposed to do but if I put the part of the code ([11,94,0],[95,95,1]) as a string in the parameters then the code runs but doesn't reclass anything. I've pasted that part of my code below as well as two screengrabs of how I set up the model parameters. Does anyone have an example on how to set this up in python (i'm using ArcGIS10) and how to set up the model parameters correctly? Thank you for your help in advance.Amelie
# Set the necessary product code
# import arcinfo
# Import arcpy module
import arcpy
from arcpy import env
# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
###################### Script arguments
Input_Land_Cover__NLCD_2006_ = arcpy.GetParameterAsText(0)
#Input_Land_Cover__NLCD_2006_ = "D:\\DATA\\NLCD\\nlcd2006_cook" # provide a default value if unspecified
Output_Workspace = arcpy.GetParameterAsText(1)
#Output_Workspace = "D:\\DATA\\DELETE" # provide a default value if unspecified
# Set environment settings
env.workspace = Output_Workspace
Zone_values_you_want_to_shrink__LC_code_ = arcpy.GetParameterAsText(2)
#Zone_values_you_want_to_shrink__LC_code_ = "11" # provide a default value if unspecified
Land_Cover_Code_for_which_you_want_to_extract_distance_measure = arcpy.GetParameterAsText(3)
#Land_Cover_Code_for_which_you_want_to_extract_distance_measure = "[11,94,0],[95,95,1]" # provide a default value if unspecified
####################
# could try this: tmp3 = Reclassify(Int(EucDistance(inR, "", "1000", "")), "VALUE", "0 NODATA", "DATA")
# Process: Reclassify
remap = arcpy.sa.RemapRange([Land_Cover_Code_for_which_you_want_to_extract_distance_measure])
nlcd_ag = arcpy.sa.Reclassify(Input_Land_Cover__NLCD_2006_, "VALUE", remap, "DATA")
out_rc1 = Output_Workspace + "\\out1"
nlcd_ag.save(out_rc1)
[ATTACH=CONFIG]14222[/ATTACH][ATTACH=CONFIG]14223[/ATTACH]