Select to view content in your preferred language

Loop through sorting

496
2
09-26-2011 04:39 PM
TedCronin
MVP Honored Contributor
Like the new capability of sorting the domains, but is there a way to loop through all the domains, like List Domains, where I can then sort each one, rather than manually selecting each one?
0 Kudos
2 Replies
RussellBrennan
Esri Contributor
Ted,

You can use the following to get a list of domains for a geodatabase:

arcpy.Describe(r'Database Connections\admin.sde').domains


This will return a python list of domain names.
DL = arcpy.Describe(r'Database Connections\admin.sde').domains
for domain in DL:
    do something...
0 Kudos
TedCronin
MVP Honored Contributor
ah, cool. thanks Russ, describe, hmm, I am finding I am using that more and more.
0 Kudos