filter = "\"FACILITY_I\" = ' '" lyr = "C:\\Users\\gisadmin\\Desktop\\TEST\\FH_Test.shp" result = int(arcpy.GetCount_management(lyr).getOutput(0)) print result
shp = r"C:\Users\gisadmin\Desktop\TEST\FH_Test.shp" filter = "\"FACILITY_I\" = ' '" lyr = arcpy.MakeFeatureLayer_management(shp, "FH_Test_lyr", filter) result = int(arcpy.GetCount_management(lyr).getOutput(0)) outtable.write(str(result)) print result
filter = "\"FACILITY_I\" = ' '" shp = r"C:\Users\gisadmin\Desktop\TEST\FH_Test.shp" lyr = arcpy.MakeFeatureLayer(shp, filter) result = int(arcpy.GetCount_management(lyr).getOutput(0)) print result
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.