import arcpy from arcpy import env env.workspace = r"C:\Temp\Test.gdb" listFCs = arcpy.ListFeatureClasses("*") for fc in listFCs: count1 = str(arcpy.GetCount_management(fc)) if count1 == "0": arcpy.Delete_management(fc)
Can you explain why you need to convert the count into a string?
I'd been trying to make this work for a little while and that was my problem - hadn't converted count into string.
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.