Random number generator


Determines the type and seed that will be used to create random numbers between 0 and 1 for all tools that utilize random numbers (for example, CreateRandomRaster, CreateRandomPoints, and the ArcGIS.Rand() function).

Learn more about Random number generators and streams

Usage tips

Command line syntax

An overview of the command line window

RandomGenerator <Random number generator>


Parameters Explanation Datatype
<Random number generator> The seed and the generator to be used for creating random values. The seed is an integer value and is used to initiate the random number generator. There are three available random number generators, STANDARD_C, ACM599, and MERSENNE_TWISTER.

The seed and generator type are specified in quotes.

randomGenerator "1 ACM599"

Random Number Generator

Data types for geoprocessing tool parameters

Command line example

randomGenerator "4 MERSENNE_TWISTER"

Scripting syntax

An overview of scripting in geoprocessing

RandomGenerator (Random number generator)


Parameters Explanation Datatype
Random number generator (Required) The seed and the generator to be used for creating random values. The seed is an integer value and is used to initiate the random number generator. There are three available random number generators, STANDARD_C, ACM599, or MERSENNE_TWISTER.

The seed and generator type are specified in quotes.

randomGenerator "1 ACM599"
Random Number Generator

Data types for geoprocessing tool parameters

Script example

import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "h:/workspace"
gp.RandomGenerator = "4 MERSENNE_TWISTER"