Python: Borrar dominios de Geodatabase

Blog Post created by mercechinchilla on May 4, 2020

import arcpy
import os
# Establesca el workspace #Puede ser la conexion SDE
myGDB = r"C:\\Simbologia\\Utility.sde"

# Get domains that exist in the geodatabase #Obtenga los dominios de la GBD
domains_existing = [ for dom in arcpy.da.ListDomains(myGDB)]

# Borrar los dominios
print ('{} unused domains in {}'.format(len(domains_existing), myGDB))
for domain in domains_existing:
arcpy.DeleteDomain_management(myGDB, domain)
print ('{} deleted'.format(domain))