I have created a model to iterate a folder of 5 shapefiles to apply the Zonal Stats as Table tool to a raster. My output table is saved as table%i% so i'm expecting it produce 5 tables (table0, table1, table2, table3, table4, table5). However it keeps saving over the same table so I just get 'table0'. Can anyone suggest where i'm going wrong? Thanks.
Import arcpy module
Check out any necessary licenses
Load required toolboxes
v5_River_Shapefiles = arcpy.GetParameterAsText(0) if v5_River_Shapefiles == '#' or not v5_River_Shapefiles: v5_River_Shapefiles = "M:\Dissertation\Data\5 River Shapefiles" # provide a default value if unspecified
FeatureClass = v5_River_Shapefiles table_i_ = FeatureClass Name = v5_River_Shapefiles Standard_Average_Annual_Rainfall_SAAR = "SAAR 5km (F)\Standard Average Annual Rainfall (SAAR)"
Process: Iterate Feature Classes
arcpy.IterateFeatureClasses_mb(v5_River_Shapefiles, "", "POLYGON", "RECURSIVE")
Process: Zonal Statistics as Table
arcpy.gp.ZonalStatisticsAsTable_sa(FeatureClass, "ID", Standard_Average_Annual_Rainfall_SAAR, table_i_, "DATA", "ALL")