AnsweredAssumed Answered

how do i use values from a multiple value parameter into a function

Question asked by stashaestha1 on Dec 27, 2017
Latest reply on Dec 28, 2017 by stashaestha1

I want to allow the user to choose several value from a list of values then later i want to use these values to iterate through a raster data set. But very time i keep getting errors saying the data set is not correct. My code is here:


import arcpy,os
inputraster = arcpy.GetParameterAsText(0)
sea_level = arcpy.GetParameterAsText(1)
fc = arcpy.GetParameterAsText(2)
clipraster = arcpy.GetParameterAsText
valuelist = [x.strip() for x in sea_level.split(";")]
for value in valuelist:
        clip_raster = arcpy.Raster(clipraster)
        floodedarea = os.path.join(outputfolder + "floods" + str(value))
        areasbelow = clip_raster <= value