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)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.