Gridnums = range(1,18) for i in Gridnums: #vis6class = ws + "/" + "TVvis6class_G" + str(i) inList = arcpy.ListFeatureClasses("*ProcGrid_"+str(i), "") print "inList: " + str(inList) arcpy.Union_analysis(InList, ws + "/" + "TVvis6class_G" + str(i))
Solved! Go to Solution.
ws + "/" + "TVvis6class_G" + str(i))
"'" + ws + "/" + "TVvis6class_G" + str(i)) + "'"
for i in Gridnums: vis6classi = "'" + ws + "/" + "TVvis6class_G" + str(i) + "i" + "'" inList = arcpy.ListFeatureClasses("*ProcGrid_"+str(i), "") print "inList: " + str(inList) arcpy.Union_analysis(InList, vis6classi) print "Union completed for Grid " + str(i)
arcpy.Union_analysis([input], output)and my tool runs smoothly. If this is a hard rule, it should be emphasized in the tool help.