import arcgisscripting gp = arcgisscripting(9.3) gp.workspace = r"c:\WhereTheShapefilesLive" thelist_of_shapefiles = gp.ListFeatureClasses('*') sqlBit = '"Value" = 0' for each in thelist_of_shapefiles: layer = each[:-4] + "Layer" # slices off the '.shp' part of the name and adds suffix 'Layer' gp.MakeFeatureLayer_management (each, layer, sqlBit) gp.DeleteFeatures_management(layer)
import arcpy arcpy.env.workspace = r"c:\WhereTheShapesfileLive" thelist_of_shapefiles = arcpy.ListFeatureClasses('*') sqlBit = '"Value" = 0' for each in thelist_of_shapefiles: layer = each[:-4] + "Layer" arcpy.MakeFeatureLayer_management (each, layer, sqlBit) arcpy.DeleteFeatures_management(layer)
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.