thresholdlist = arcpy.GetParameterAsText(2) splitthreshold = thresholdlist.split(",") for threshold in splitthreshold: ...
thresholdlist = arcpy.GetParameterAsText(2) splitthreshold = [int(x) for x in thresholdlist.split(',')] for threshold in splitthreshold: ...
If you need to use those values as integers and not strings, you can use this:thresholdlist = arcpy.GetParameterAsText(2) splitthreshold = [int(x) for x in thresholdlist.split(',')] for threshold in splitthreshold: ...See 'List Comprehensions' in the Python documentation for an explanation
I am running ArcGIS 10 and I am running it as tool. Any suggestions/ideas?
strList = gp.GetParameterAsText(2) lstNums = strList.split(';')
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.