ArcGIS 10.2.1 - Windows 7 pro - python 2.7 or 3.x
So someone gives you a .gdb with about 45 feature classes, each of which have anywhere from 10 to 25 Fields including sub types and domains.
How do you go about exporting that Database design to something you can look at as a whole...
If sub types are too much to ask for then they can be left out.
like this
featureClass1
Fieldname1
Fieldname2
Fieldname3
domain choice 1
domain choice 2
domain choice 3
Fieldname4
Fieldname5
domain choice 1
domain choice 2
domain choice 3
domain choice 4
featureClass2
etc. etc. etc.
I have exported domain lists but i am not quite sure how to get all of the fields and table names:
Here is a domain export script: But it isn't quite what i'm looking for
import arcpy
import sys, os
domains = arcpy.da.ListDomains("C:\Users\******\Desktop\AP_SCHEMA_WATER_V1.4.gdb")
listName = "domainNamesGDB.csv"
handle = open(listName, 'w')
for domain in domains:
handle.write("{0} \n".format(domain.name))
if domain.domainType == 'CodedValue':
coded_values = domain.codedValues
for val, desc in coded_values.iteritems():
handle.write('{0} , {1}\n'.format(val, desc))
elif domain.domainType == 'Range':
print('Min: {0}'.format(domain.range[0]))
print('Max: {1}'.format(domain.range[1]))
handle.close()
thanks in advance for any help you might be able to provide.
James