Create a dummy feature class in the place where your feature class could exists or not (location) such the your feature class exists. Run the model once based on this blogIf you are stuck at "if" �?? Part 1. This blog has an example for your case.
import sys, os, arcpy # Get the input from the model InputFC = arcpy.GetParameterAsText(0) # Statement to check the existence of the feature class if arcpy.Exists(InputFC): arcpy.AddMessage("Feature Class Exists and will be deleted!") arcpy.Delete_management(InputFC, "FeatureClass") arcpy.SetParameterAsText(1,"True")
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.