Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

No luck on the Esri forums, so I thought I would try here.

I was trying to determine the best way to standardize my attribute table. I thought first I would just use a coded value domain but I am unable to without creating a subtype first, I don't understand this but figured I would just create a blank subtype to create the coded value domain, trouble is subtypes require a Long integer field which when exported to a shapefile are meaningless, just a number in a field. So I decided to just create a new subtype properly. I attempted to delete the before mentioned domain and I get the error "Failed to delete a domain from the database. The domain is used by an attribute rule" Trouble is I removed that "attribute rule but it still wont delete. The idea of subtypes and domains are a great idea but this locking problem and the subtype field requirement of being an integer rather than String is an issue for me. Any help would be appreciated, for now I will just create the subtype and leave the domain.

share|improve this question

3 Answers 3

You shouldn't need to create a subtype in order to use a coded value domain. It's easy to be fooled by the domain properties dialog as it doesn't have any indicators that the rows in the Domain Properties sections are actually pick lists and it's only the default which is long integer.

domain properties showing drop down field type

I just verified domains without subtypes works (in v10) with:

  1. Start ArcCatalog
  2. create new file gdb, create empty feature class
  3. add a few text fields to the FC
  4. goto fgdb properties, select Domain tab, enter a name in first row
  5. Select Field Type of text, then Domain Type of Coded Values, add a couple of values and descriptions, save
  6. Select FC > Properties > Fields and then apply the coded value domain in the Field Properties section.

Use the same dialog as in #6 to remove a domain from a feature class, and then you can delete the domain from the gdb. If the geodatabase doesn't have any attribute domains defined the domain row of this dialog remains hidden. This method is also covered here.

The same can be accomplished using the Create Domain geoprocessing tool.

share|improve this answer
    
had the same problem: ArcCatalog wouldn't let me create a domain unless I created a subtype first. Using Create Domain geoprocessing tool prom ArcToolbox solved the problem, so thanks Matt Wilkie –  Ligia 15 hours ago

Subtypes and Domains are for Geodatabases only - exporting to shapefiles will not work (they are old tech compared to geodatabases)

subtypes categorize your data.

domains constrain input information to validate data entry.

Apply coded or ranged domains to features, enabling you to constrain input information to a valid set of values. For example, in a water distribution network, the subtype water mains could have a coded domain for building materials restricting them to be made of cast iron, ductile iron, or copper.

Range domains—A range domain specifies a valid range of values for a numeric attribute

Coded domains—A coded value domain can apply to any type of attribute—text, numeric, date, and so on. Coded value domains specify a valid set of values for an attribute. (you want these)

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_attribute_domains/001s00000001000000/

share|improve this answer
3  
this is a nice succinct definition of subtypes and domains, particularly domains, and I like that. When I read it there was an "Aha! now I get it" moment. However it shouldn't really be voted so high for this particular Q because it doesn't go to the root of the OPs problem, who already know s/he wanted Coded Value domains but had been unsuccessful in acheiving it. –  matt wilkie Sep 7 '11 at 23:08

Use the "Remove Domain from Field" tool (Data Management > Domains) to remove the attribute rule, allowing you to delete the domain.

If you want to export a domain to a shapefile, you have to go through a six step process.

  1. Export the feature class to shapefile.
  2. Add a new field of the appropriate type to the shapefile (e.g. String if the domain codes into a string).
  3. Export the domain table using "Domain to Table" (Data Management > Domains).
  4. Join the exported domain table to the shapefile's attribute table using the long integer code field in the shapefile joined to the code field on the domain table
  5. Calculate value on the added field, using the description field from the domain table.
  6. Remove the join. You can optionally delete the long integer code field in the shapefile too.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.