I need to Replace the Domain on Field level on my Geodatabase.
My Geodatabase having multiple features and tables where at each on field one Domain is assigned, I need to replace that Domain and Delete old domain.
To better way understand. (example)
- Table1 having Field XYZ on which Domain A1 is assigned
now I like to replace A1 with A2 and once it change for all the tables I would like to delete A1 from my Domains.
I search on internet but I could not find any helping materials.
Do I do this with performing some query on database ?
select * from sde.GDB_ITEMS
Above query get me all the domains which exists for my Geodatabase but I could not to find relation how this domains is assigned to my tables (how's the relationship between them?)
I do believe that with that relationship I can replace the domain.
I am not python developer.. but I am trying to write this script..
>>> import arcpy
... admin_workspace = "Database Connections/WGis01-SDE.sde"
... arcpy.env.workspace = admin_workspace
... domain_to_search = r"MM Work Function_1" #supply the CV domain name
... datasets = arcpy.ListDatasets()
... for dataset in datasets:
... if dataset == N.Electric:
... featureclasses = arcpy.ListFeatureClasses()
... for featureclass in featureclasses:
... print featureclass
...
Parsing error IndentationError: expected an indented block (line 9) >>>
Please Help to get it done.
Aucun commentaire:
Enregistrer un commentaire