Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Domains toolset > Tools

Set Value for Range Domain (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Sets the minimum and maximum values for an existing Range domain.


Usage tips

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
Data types for geoprocessing tool parameters


Command line example

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

Data types for geoprocessing tool parameters


Script example

# 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()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.