So I have 490 point fc's in a single directory with uniform spatial features, field names/datatypes. I'm trying to figure out how to consecutively input the first seven fc's into the merge tool, create a new merged fc, and then iterate the model until 70 new merged fc's are created.
I know how to iterate single fc's as input into a tool, but not multiple features per x number of iterations.
I have some code below that uses list, an array, and a count system that does what i need for another GP operation. How can I translate this into modelbuilder's variables/methods? I am using modelbuilder because I was having trouble mapping fields for merge in python
try: # Create list of rasters rasters = arcpy.ListRasters("*", "tif") rastersCount = len(rasters) counter = 0 weekNum = 1 while counter < rastersCount: #collect 7 consecutive rasters weekRasters =  for i in range(counter,(counter+7)): weekRasters.append(rasters[i]) # Execute CellStatistics (one can use list of rasters directly here) outCellStatistics = CellStatistics(weekRasters, "SUM", "NODATA") # Save the output outRasterName = "week_"+ str(weekNum) outCellStatistics.save("D:/dailyrainfall/nueces_dailyrainfall_rasterized/" + outRasterName ) counter += 7 weekNum += 1 except: # If an error occurred while running a tool, then print the messages. print arcpy.GetMessages()
Using ArcGIS 10 (ArcInfo) SP4 with all extensions