Select to view content in your preferred language

Subtypes and Domains

5139
7
02-14-2013 05:22 AM
DaveAugspurger
Deactivated User
I am trying to understand how use domains within a subtype (if that's possible).  I apologize for my ignorance but I'm just learning about geodatabases, domains, subtypes, etc. etc.

Anyway, I have a feature class (fiber optic cable) that has a subtype (buried or aerial).  I'd like to further define the type of cable to indicate ownership (such as: owned, leased, shared, etc.).  So, a particular cable might be "Buried - Owned" while another might be "Aerial - Leased".

So, I tried to add a domain listing about 20 different types of ownership.  Then I tried to assign that domain to a new field I added called "Ownership".  When I try to edit the feature, the Ownership field is <Null> and is not connected to the domain.  After reading up on this, it looks like since the feature has a subtype, then I can't have another coded value domain for my ownership.

In very simple terms 🙂 can anyone explain to me how to accomplish this?  Can a feature have more than one field assigned a domain?  What if there are subtypes assigned to that feature?  Should I just add more coded values to the domain for the subtype? 

Man, this is confusing terminology 🙂  Thansk for any advice or help!
0 Kudos
7 Replies
Robert_LeClair
Esri Esteemed Contributor
Dave -

The short answer to your question is - yes, each subtype can have it's own domain.  One attribute field will be an integer and used for your subtype.  Another attibute field (text, integer, float, etc.) will be for your attribute domain.

The long answer is:  In the Catalog window in ArcMap, right click the feature class and click properties.  Select the Subtypes tab to build your subtypes based upon a short or long integer field type.  On the lower right of the Subtypes panel, you'll click the Domains button to build attribute domains.  You can build a specific attribute domain for aerial or buried if you wish or just one big attribute domain for both - depends on the attributes.  Make sure your attribute domain field type  (text, integer, float, etc.) matches the attribute field type (text, integer, float, etc.)  After you build the domain(s), click OK and return to the subtype panel.  At the top of the Subtype panel, select the first subtype - aerial or buried and then navigate towards the bottom of the subtype panel - you'll see "Default attributes and domains" - and for the ownership field, click the domain box to apply the specific domain to the subtype.  Repeat this for the 2nd subtype.  Click OK.  Now you have a specific domain for a specific subtype.

This workflow is described here:  http://resources.arcgis.com/en/help/main/10.1/index.html#/Associating_default_values_and_domains_wit...

Hope this helps.

Regards,

Robert LeClair
Esri-Denver
0 Kudos
DaveAugspurger
Deactivated User
Thanks, that does help.  I was able to stumble my way to this conclusion but having it spelled out helps a lot.  I was able to create an Aerial and a Buried domain, each with basically the exact same coded values.  I can see where this would be a good place to separate options and may tackle that next.  Right now, I am populating the fields using the field calculator and entering the coded value...working well I think (I have about 1500 features).

Thanks
0 Kudos
DaveAugspurger
Deactivated User
Ok, I am stuck again 🙂

I was able to add the Domain mentioned in my first post and then populate the fields with the "drop-down" selection which was associated with the coded values in the domain I created.

Now, I want to add a few more domains with coded values.  The simplest one is whether or not a feature is within a particular "zone".  I have about 8 zones related to certain highways.  So, I right-click on the sde file and select Properties.  Then, I go to Domain tab.  At the bottom of the list of Domains I create a new Domain called UAOF (my zones) in the first empty space.  I then select Long Integer and Coded Values.  In the Coded Values table I enter 1-8 and a description of each type.  I hit apply and exit.

I next add a field to the feature called UAOF and point to the domain I created above.  Finally, I begin an edit session on the feature.

So, when I go to edit a field under the new UAOF field, I click an empty field and only get the flashing cursor bar....I don't get the drop-down list of my coded values.

Any ideas as to why this is happening?  I've tried several times now and the results are the same each time.  I must be missing something as this seems like it should be pretty easy.  Help 🙂
0 Kudos
LeoDonahue
Deactivated User
Ok, I am stuck again 🙂
I next add a field to the feature called UAOF and point to the domain I created above.  Finally, I begin an edit session on the feature.

What data type did you use for this UAOF field?  Long Integer?
0 Kudos
DaveAugspurger
Deactivated User
I think I figured it out.  I had to go into the SubType and assign the domains to both subtypes.  That seemed to do the trick.  So much to learn....

Thanks for the help though.
0 Kudos
DaveAugspurger
Deactivated User
Yet another road block.  I finally figured out how to create domains and get them assigned under subtypes but quickly hit another hurdle I'm unable to figure out after dozens of efforts and fruitless internet searches.  I don't think I'm unsmart but it seems like every time I run a new "tool" it fails because I didn't have every last thing absolutely perfect...and the help files are a tad thin (to be nice).

So, my most recent and current problem:  I have to create a domain called "Owner" that will have about 200 records of various owner names.  That data is in an excel spreadsheet.  Ideally, I could import this table and save me from having to type in all 200 of these coded values...right?

To do so, I've tried using teh "Table to Table" tool to convert the spreadsheet (saved as CSV) into a DBF.  That seems to work and gives me a DBF that ArcGIS can read.  When I try to use the "Table To Domain" tool I get the following error:  ERROR 999999: Error executing function.
The value being added to the CodedValueDomain already exists. [domain name: Owner, code name: ]
Failed to execute (TableToDomain).

I've tried changing the field formats in the DBF, importing into a new Domain and existing Domain, and several other stabs at it this.  Nothing seems to work.  I'm sure it's probably something simple and I just have to have my data all perfect but for a non-database administrator this is way above my pay grade...maybe I am unsmart.  So, what does the error above tell me I'm doing wrong?

Thanks!

0 Kudos
DaveAugspurger
Deactivated User
I still don't know why it wouldn't work the way I was trying but I figured out a solution.  I was able to bring the table into ArcMap, then export it to another table, then use that table with the "Table To Domain" tool.  That worked....glad it's Friday :-0
0 Kudos