2

I have a File GeoDatabase (v10.0) with multiple layers. Each layer has a range of Subtypes (1 to 20+). I have created coded domain values that I would like to assign to their appropriate field. I know the manual approach, but I am hoping to find a more automated system. Does anyone know of a way, tool, plugin, etc. to batch assign the coded domain values to fields that have subtypes?

Attached is a graphic of the properties of one of my layers. In the Subtypes section you can see that there are many Codes (205, 206, 207, 224, etc.). In the Default Values and Domains section there are four (4) fields of interest (TypeComp, Type2Comp, Layer, and UserName). In order to have the correct Domains associated to the correct field, I need to associate the Domain to the field for each Subtype code. I want to know if there is an automated way to do this, as I have 13 layers, and each layer has multiple Subtype codes.

enter image description here

2

This will only apply to ArcGIS for Desktop 10.1 and later but at those versions the Assign Domain To Field (Data Management) tool is available and ...

Sets the domain for a particular field and, optionally, for a subtype. If no subtype is specified, the domain is only assigned to the specified field.

To obtain an iterable list of subtypes for a field arcpy.da.ListSubtypes can be used.

  • This only lets you add a Domain to one feature class/table at a time I think OP as well as myself want a method to apply a Domain to multiple Feature Classes/Tables at once. – NULL.Dude Dec 8 '16 at 14:58
  • @Joe to apply this to more than one subtype you use ListSubtypes to iterate through the subtypes and run the tool multiple times. – PolyGeo Dec 8 '16 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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