Hello everyone,
After deleting the representation from several feature classes inside a feature dataset, I get the error message bellow when I try to export the schema or when I try to copy the feature dataset to another geodatabase.
XML export failed: The domain was not found. ([featureclass]_Rep1_Rules)
The problem shows in SDE 10.2.x and in File Geodatabases 10.2.2 using ArcGIs 10.2.2.
Any explanation?
I found the problem and a solution.
It looks like when removing the representation from a feature class it removes fields, and domains related to thee representation, but it does not remove the link between these same fields and the domain listed under the Subtypes of the feature class.
To solve this issue I just removed the domain for the fields RULEID and RULEID_1 at the field list level and also inside each Subtype field list level:
if fname == "SFitting":
stypeList = ["1", "2", "3","4","5","6","7","8","9","10","11", "12", "13", "14"]
try:
arcpy.RemoveDomainFromField_management(fc, "RULEID")
except Exception:
print arcpy.GetMessages(0)
pass
try:
arcpy.RemoveDomainFromField_management(fc, "RULEID_1" )
except Exception:
print arcpy.GetMessages(0)
pass
if stypeList:
try:
arcpy.RemoveDomainFromField_management(fc, "RULEID", stypeList)
except Exception:
print arcpy.GetMessages(0)
pass
try:
arcpy.RemoveDomainFromField_management(fc, "RULEID_1", stypeList )
except Exception:
print arcpy.GetMessages(0)
pass