Set Value for Range Domain (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Sets the minimum and maximum values for an existing Range domain.
Usage tips
A range domain specifies a valid range of values for a numeric attribute. For example, a valid range of water main pressure values might be between 50 and 75 psi.
Domain management involves the following steps:
1) Create the domain using the Create Domain tool.
2) 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.
3) Associate the domain with a feature class using the Assign Domain To Field tool.
Workspace domains can also be managed in ArcCatalog. Domains can be created and modified through the Domains tab on the Database Properties dialog box.
The environment settings do not have an effect on this tool.
Command line syntax
An overview of the Command Line window
SetValueForRangeDomain_management <in_workspace> <domain_name> <min_value> <max_value>
Parameter | Explanation | Data Type |
<in_workspace> |
The geodatabase containing the domain to be updated. |
Workspace |
<domain_name> |
The name of the range domain to be updated. |
String |
<min_value> |
The minimum value of the range domain. |
String |
<max_value> |
The maximum value of the range domain. |
String |
workspace E:\arcgis\ArcTutor\BuildingaGeodatabase SetValueForRangeDomain montgomery.mdb RotAngle 0 359
Scripting syntax
About getting started with writing geoprocessing scripts
SetValueForRangeDomain_management (in_workspace, domain_name, min_value, max_value)
Parameter | Explanation | Data Type |
in_workspace (Required) |
The geodatabase containing the domain to be updated. |
Workspace |
domain_name (Required) |
The name of the range domain to be updated. |
String |
min_value (Required) |
The minimum value of the range domain. |
String |
max_value (Required) |
The maximum value of the range domain. |
String |
# Purpose: Create an attribute domain to constrain valid rotation angle # Create the Geoprocessor object import arcgisscripting gp = arcgisscripting.create() try: # Set the workspace (to avoid having to type in the full path to the data every time) gp.Workspace = "E:/arcgis/ArcTutor/BuildingaGeodatabase" # Set variable for domain name domname = "RotAngle2" # Process: Create the range domain gp.CreateDomain("montgomery.mdb", domname, "Valid rotation angle", "LONG", "RANGE") # Process: Set the minimum and maximum values for the range domain gp.SetValueForRangeDomain("montgomery.mdb", domname, 0, 359) # Process: Constrain the fitting rotation angle gp.AssignDomainToField("Montgomery.mdb/Water/fittings", "ANGLE", domname) except: # If an error occurred while running a tool print the messages print gp.GetMessages()