Script to extract schema:
def listfileds(src):
fields = arcpy.ListFields(src)
for field in fields:
print("{0} is a type of {1} with a length of {2}"
.format(field.name, field.type, field.length))
Script to extract Domains:
import arcpy
...
... def listDomains(src):
... domains = arcpy.da.ListDomains(src)
...
... for domain in domains:
... print('Domain name: {0}'.format(domain.name))
... if domain.domainType == 'CodedValue':
... coded_values = domain.codedValues
... for val, desc in coded_values.items():
... print('{0} : {1}'.format(val, desc))
... elif domain.domainType == 'Range':
... print('Min: {0}'.format(domain.range[0]))
... print('Max: {0}'.format(domain.range[1]))
www.facebook.com/khalidmahmoodgis