import arcpy from arcpy import env #Setting the env workspace to be an SDE geodatabase # env.workspace = r'C:\sde_at_DB101.sde' #Getting the existing polygon feature class as input parameter # GetExistingPolyFC = arcpy.GetParameterAsText(0) GetPolyFC = GetExistingPolyFC # Truncate a feature class if it exists # if arcpy.Exists(GetPolyFC): arcpy.AddMessage("Polygon feature class exists, start working...") arcpy.TruncateTable_management(r'C:\sde_at_DB_101.sde\%s' %GetPolyFC) arcpy.AddMessage("Truncating table is complete") else: arcpy.AddMessage("Polygon feature class does not exist")
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.