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")
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.