Summary
Alters the properties of an existing attribute domain in a workspace.
Usage
- Domain management involves the following steps: - Modify an existing domain using this tool, or create a new domain using the Create Domain tool.
- Add values to or set the range of values for the domain using the Add Coded Value to Domain tool or Set Value For Range Domain tool.
- Associate the domain with a feature class using the Assign Domain To Field tool.
 
- Coded value domains only support default value, duplicate split policy, and default value merge policy. 
- Range domains support all split and merge policies. After a split or merge operation, the attribute values of output features are calculated based on the numeric values of the input features and the specified split or merge policy. 
Syntax
AlterDomain(in_workspace, domain_name, {new_domain_name}, {new_domain_description}, {split_policy}, {merge_policy})| Parameter | Explanation | Data Type | 
| in_workspace | The geodatabase that contains the domain to be altered. | Workspace | 
| domain_name | The name of the domain to be altered. | String | 
| new_domain_name (Optional) | The new name of the domain. | String | 
| new_domain_description (Optional) | The new description of the domain. | String | 
| split_policy (Optional) | The split policy of the domain. The behavior of an attribute's values when a feature that is split is controlled by its split policy. 
 | String | 
| merge_policy (Optional) | The merge policy of the domain. When two features are merged into a single feature, merge policies control attribute values in the new feature. Altering this property applies only to range domains, as coded value domains may only use the default merge policy. 
 | String | 
Derived Output
| Name | Explanation | Data Type | 
| out_workspace | The updated input workspace. | Workspace | 
Code sample
The following code snippet demonstrates how to use AlterDomain in the Python window.
arcpy.env.workspace = "C:/data"
arcpy.AlterDomain_management("montgomery.gdb", "Material", "PipeMaterial", "Valid pipe materials", "DUPLICATE", "DEFAULT")The following code snippet demonstrates how to use AlterDomain in a stand-alone script.
# Name: AlterDomain.py
# Description: Modify an attribute domain to constrain valid date
#              range for wildlife sightings.
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env
 
# Set the workspace
env.workspace = "C:/data"
 
# Set local parameters
gdb = "Habitat.gdb"
domName = "CoastalArea"
new_domName = "SightingSeason"
new_desc = "Range of valid dates for sightings"
new_split = "DUPLICATE"
new_merge = "AREA_WEIGHTED"
# Process: Modify the range domain
arcpy.AlterDomain_management(gdb, domName, new_domName, new_desc, new_split, new_merge)Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes