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

Calculate Value (Data Management) (ArcInfo only)

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

Print all topics in : "Tools"


Related Topics

NOTE: This tool is available with an ArcView or ArcEditor license, if the Spatial Analyst extension or the 3D Analyst extension is installed.


Returns a value based on a user specified python expression.


Usage tips

Command line syntax
An overview of the Command Line window
CalculateValue_management <expression> {code_block}

Parameter Explanation Data Type
<expression>

The python expression to be evaluated.

SQL Expression
{code_block}

Additional python code. Code in the code block can be referenced in the expression parameter.

String
Data types for geoprocessing tool parameters


Command line example

CalculateValue "arcgis.rand('Integer 0 100')"

Scripting syntax
About getting started with writing geoprocessing scripts
CalculateValue_management (expression, code_block)

Parameter Explanation Data Type
expression (Required)

The python expression to be evaluated.

SQL Expression
code_block (Optional)

Additional python code. Code in the code block can be referenced in the expression parameter.

String

Data types for geoprocessing tool parameters


Script example

import arcgisscripting
gp = arcgisscripting.create()

for x in range(0, 50):
    print gp.CalculateValue("arcgis.rand('Integer 0 100')")

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