env

Summary

Environment settings are exposed as properties on ArcPy's env class. These properties can be used to retrieve the current values or to set them. Geoprocessing environment settings can be thought of as additional parameters that affect a tool's results.

Properties

PropertyExplanationData Type
addOutputsToMap
(Read and Write)

The tool's resulting output datasets will be added to the application display. The property is only applicable when used directly in the Python window or from a Notebook in ArcGIS Pro.

Boolean
annotationTextStringFieldLength
(Read and Write)

Tools that honor the Annotation Text String Field Length environment will override the default field length on the TextString field in any annotation feature classes created in a database.

Learn more about annotationTextStringFieldLength.

Long
autoCancelling
(Read and Write)

When autoCancelling is set to True, a cancellation will end the script on the current line. If False, a cancellation will set the isCancelled property to True and continue executing. The default is True.

For use in script tools or Python toolbox tools.

Learn more about cancellation behavior.

Boolean
autoCommit
(Read and Write)

Tools that honor the Auto Commit environment will force a commit after the specified number of changes have been made within an enterprise geodatabase transaction.

Learn more about autoCommit.

Long
baDataSource
(Read and Write)

Tools that honor the Data Source environment comply with how data is summarized from one layer to another. This environment is used by Business Analyst tools only.

Learn more about baDataSource.

String
baNetworkSource
(Read and Write)

Tools that honor the Network Source environment allow you to set your network dataset or service used for network distance calculation tasks. This is used by Business Analyst tools only.

Learn more about baNetworkSource.

String
baUseDetailedAggregation
(Read and Write)

Tools that honor the Use Detailed Aggregation environment will use a detailed data aggregation method for areas beyond a specified radius. This environment is used by Business Analyst tools only.

Learn more about baUseDetailedAggregation.

Boolean
buildStatsAndRATForTempRaster
(Read and Write)

Controls the calculation of statistics and building of raster attribute tables (RAT) for temporary rasters created by Spatial Analyst tools. The environment is only used from the interactive Python window in the application. The default is True.

When set to False, the statistics will be approximate for the purpose of symbolizing raster layers, and no RAT will be built.

Boolean
cartographicCoordinateSystem
(Read and Write)

Tools that honor the Cartographic Coordinate System environment will use the specified coordinate system to determine the size, extent, and spatial relationships of features when making calculations.

Learn more about cartographicCoordinateSystem.

String
cartographicPartitions
(Read and Write)

Tools that honor the Cartographic Partitions environment will subdivide input features by the specified partition polygon features for sequential processing to avoid memory limitations that may otherwise be encountered with large datasets.

Learn more about cartographicPartitions.

String
cellSize
(Read and Write)

Tools that honor the Cell Size environment set the output raster cell size, or resolution, for the operation. The default output resolution is determined by the coarsest of the input raster datasets.

Learn more about cellSize.

String
cellSizeProjectionMethod
(Read and Write)

Tools that honor the Cell Size Projection Method environment will use the specified method for calculating the output raster cell size when datasets are projected during analysis.

Learn more about cellSizeProjectionMethod.

String
coincidentPoints
(Read and Write)

Tools that honor the Coincident Points environment define how coincident data is treated in Geostatistical Analyst.

Learn more about coincidentPoints.

String
compression
(Read and Write)

Tools that honor the Compression environment will set the compression type when storing output raster datasets.

Learn more about compression.

String
configKeyword
(Read and Write)

Tools that honor the Output CONFIG Keyword environment will use the specified keyword when creating datasets in a geodatabase.

Learn more about configKeyword.

String
extent
(Read and Write)

Tools that honor the Extent environment will only process features or rasters that fall within the extent specified in this setting.

Learn more about extent.

String
geographicTransformations
(Read and Write)

Tools that honor the Geographic Transformations environment will use the transformation methods when projecting data.

Learn more about geographicTransformations.

String
gpuId
(Read and Write)

Tools that honor the GPU ID environment identify the GPU to use to process your data.

Learn more about gpuId.

Long
isCancelled
(Read Only)

When autoCancelling is set to False and the tool has been cancelled, isCancelled will be set to True. isCancelled is False by default and is a read-only property.

For use in script tools or Python toolbox tools.

Learn more about cancellation behavior.

Boolean
maintainAttachments
(Read and Write)

Tools that honor the Maintain Attachments environment will copy attachments from the input features to the output features. An attachment table and a relationship class will be created.

Learn more about maintainAttachments.

Boolean
maintainCurveSegments
(Read and Write)

Tools that honor the Maintain Curve Segments environment will maintain input curve segments in the output.

Learn more about maintainCurveSegments.

Boolean
maintainSpatialIndex
(Read and Write)

Legacy:

The Maintain Spatial Index environment is not honored in ArcGIS Pro. To have the same behavior as the Maintain Spatial Index environment in ArcGIS Pro when running tools and workflows that perform insert, update, and delete operations on existing data in enterprise geodatabases, control of the spatial index can be accomplished using the Remove Spatial Index tool to remove the spatial index prior to processing, and the Add Spatial Index tool to re-create the spatial index after processing.

The Append tool also supports this workflow with file geodatabase data.

Boolean
mask
(Read and Write)

Tools that honor the Mask environment will only consider those cells that fall within the analysis mask in the operation.

Learn more about mask.

String
matchMultidimensionalVariable
(Read and Write)

Tools that honor the Match Multidimensional Variable environment will generate a multidimensional raster only if the input multidimensional rasters share at least one variable with the same name.

Learn more about matchMultidimensionalVariable.

String
MDomain
(Read and Write)

Tools that honor the Output M Domain environment will generate output datasets with the specified measure (m)-domain.

Learn more about MDomain.

String
MResolution
(Read and Write)

Tools that honor the M Resolution environment will apply the m-resolution to output geodatasets. The m-resolution, expressed as a very small distance, refers to the number of significant digits used to store m-values.

Learn more about MResolution.

Double
MTolerance
(Read and Write)

Tools that honor the M Tolerance environment will override the default m-tolerance on geodatasets created in a geodatabase.

Learn more about MTolerance.

Double
nodata
(Read and Write)

Tools that honor the NoData environment will only process rasters in which the NoData value is valid.

Learn more about nodata.

String
outputCoordinateSystem
(Read and Write)

Tools that honor the Output Coordinate System environment will create output geodatasets with the specified coordinate system.

Learn more about outputCoordinateSystem.

String
outputMFlag
(Read and Write)

Tools that honor the Output has M Values environment will control whether the output geodataset will store m-values.

Learn more about outputMFlag.

String
cellAlignment
(Read and Write)

Tools that honor the Cell Alignment environment will adjust the cell alignment of the output to match the cell alignment of the specified processing extent.

Learn more about cellAlignment

String
outputZFlag
(Read and Write)

Tools that honor the Output has Z Values environment will control whether the output geodataset will store z-values.

Learn more about outputZFlag.

String
outputZValue
(Read and Write)

Tools that honor the Default Output Z Value environment will set the z-coordinate for each output vertex that does not already have a z-coordinate.

Learn more about outputZValue.

String
overwriteOutput
(Read and Write)

Controls whether tools will automatically overwrite any existing output when run. When set to True, tools will execute and overwrite the output dataset. When set to False, existing outputs will not be overwritten, and the tool will return an error.

Boolean
packageWorkspace
(Read Only)

The Package Workspace environment setting is the location of a folder that locates the contents of a shared geoprocessing package or service.

Learn more about packageWorkspace.

String
parallelProcessingFactor
(Read and Write)

Tools that honor the Parallel Processing Factor environment will divide and perform operations across multiple processes.

Learn more about parallelProcessingFactor.

Integer
processingServer
(Read and Write)

Tools that honor the Remote Processing Server set of environments specify the server, user name, and password for ArcGIS Server when you use the Parallel Processing Factor environment.

The ArcGIS server name or IP address that has the Raster Processing system service enabled. If the Processing Server is a server cluster, use the server name that is the site host.

Learn more about processingServer.

String
processingServerPassword
(Read and Write)

Tools that honor the Remote Processing Server set of environments specify the server, user name, and password for ArcGIS Server when you use the Parallel Processing Factor environment.

The password associated with the user name that is authorized to use the Raster Processing service.

Learn more about processingServerPassword.

String
processingServerUser
(Read and Write)

Tools that honor the Remote Processing Server set of environments specify the server, user name, and password for ArcGIS Server when you use the Parallel Processing Factor environment.

The user name that is authorized to use the Raster Processing service.

Learn more about processingServerUser.

String
processorType
(Read and Write)

Tools that honor the Processor Type environment allow you to choose where and how you want to process your data.

Learn more about processorType.

Long
pyramid
(Read and Write)

Tools that honor the Pyramid environment will only process rasters where the pyramids are valid. Pyramids for ERDAS IMAGINE files have limited options that can be set.

Learn more about pyramid.

String
qualifiedFieldNames
(Read and Write)

Tools that honor the Maintain fully qualified field names environment use this setting to distinguish between qualified and unqualified field names. Qualified field names are the names of fields in a feature class or table that have the name of the origin feature class or table appended to the field name. This setting is relevant when working with joined data.

Learn more about qualifiedFieldNames.

Boolean
randomGenerator
(Read and Write)

Tools that use the Random Number Generator environment use algorithms that use the seed and distribution to produce a sequence of random numbers.

Learn more about randomGenerator.

Object
rasterStatistics
(Read and Write)

Tools that honor the Raster Statistics environment control how statistics are built for output raster datasets.

Learn more about rasterStatistics.

String
recycleProcessingWorkers
(Read and Write)

Tools that honor the Recycle Interval Of Processing Workers environment define how many image sections will be processed before restarting worker processes to prevent potential failures in long-running processes.

Learn more about recycleProcessingWorkers

Long
referenceScale
(Read and Write)

Tools that honor the Reference Scale environment will consider the graphical size and extent of symbolized features as they appear at the reference scale.

Learn more about referenceScale.

Double
resamplingMethod
(Read and Write)

Tools that honor the Resample environment interpolate pixel values while transforming your raster dataset. This is used when the input and output do not line up exactly, when the pixel size changes, when the data is shifted, or a combination of these.

Learn more about resamplingMethod.

String
retryOnFailures
(Read and Write)

Tools that honors the Number of Retries On Failures environment will retry the same worker process a specified number of attempts when there is a failure processing a particular job.

Learn more about retryOnFailures.

Long
scratchFolder
(Read Only)

The Scratch Folder environment setting is the location of a folder you can use to write file-based data, such as shapefiles, text files, and layer files.

Learn more about scratchFolder.

String
scratchGDB
(Read Only)

The Scratch GDB environment setting is the location of a file geodatabase you can use to write temporary data.

Learn more about scratchGDB.

String
scriptWorkspace
(Read Only)

The Script Workspace is the location of a project and is used by geoprocessing tools when they have been included in a project package (.ppkx file) and extracted.

String
scratchWorkspace
(Read and Write)

Tools that honor the Scratch Workspace environment use the specified location as the default workspace for output datasets. The Scratch Workspace is intended for output data you do not want to maintain.

Learn more about scratchWorkspace.

String
snapRaster
(Read and Write)

Tools that honor the Snap Raster environment will adjust the extent of output rasters so that they match the cell alignment of the specified snap raster.

Learn more about snapRaster.

String
S100FeatureCatalogueFile
(Read and Write)

Tools that honor the S-100 Feature Catalogue File environment use the file specified to map objects, attributes, feature classes, and relationships during data import and the creation of database schemas.

Learn more about S100FeatureCatalogueFile.

String
terrainMemoryUsage
(Read and Write)

Tools that honor the Minimize memory use during analysis on terrains environment control memory use during analysis on terrains.

Learn more about terrainMemoryUsage.

Boolean
tileSize
(Read and Write)

Tools that honor the Tile Size environment set the tile size for rasters that are stored in blocks of data.

Learn more about tileSize.

String
tinSaveVersion
(Read and Write)

Tools that honor the Default TIN Storage Version environment will output TIN surfaces in the specified version.

Learn more about tinSaveVersion.

String
transferDomains
(Read and Write)

Tools that honor the Transfer field domain descriptions environment control whether output shapefiles and dBASE tables (.dbf) will have fields added containing domain and subtype descriptions, in addition to fields containing domain and subtype codes. This setting is only relevant when the input to a geoprocessing tool is a geodatabase feature class or table with defined domains and subtypes. By default, only domain and subtype codes are included in shapefile or dBASE output.

Learn more about transferDomains.

Boolean
transferGDBAttributeProperties
(Read and Write)

Tools that honor the Transfer Geodatabase Field Properties environment will transfer domains, subtypes, attribute rules, field groups, and contingent values from the input dataset's fields to the output dataset's fields.

Learn more about transferGDBAttributeProperties.

Boolean
unionDimension
(Read and Write)

Tools that honor the Union Dimension environment will generate a multidimensional raster that includes all the dimensions from the input multidimensional rasters.

Learn more about unionDimension.

Boolean
workspace
(Read and Write)

Tools that honor the Current Workspace environment use the workspace specified as the default location for geoprocessing tool inputs and outputs.

Learn more about currentWorkspace.

String
XYDomain
(Read and Write)

Tools that honor the Output XY Domain environment will set the specified range to the output geodataset's x,y domain.

Learn more about XYDomain.

String
XYResolution
(Read and Write)

Tools that honor the XY Resolution environment will apply the x,y resolution to output geodatasets. The x,y resolution, expressed as a very small distance, refers to the number of significant digits used to store x,y coordinate values.

Learn more about XYResolution.

String
XYTolerance
(Read and Write)

Tools that honor the XY Tolerance environment will override the default x,y tolerance on geodatasets created in a geodatabase.

Learn more about XYTolerance.

String
ZDomain
(Read and Write)

Tools that honor the Output Z Domain environment will generate output datasets with the specified z-domain.

Learn more about ZDomain.

String
ZResolution
(Read and Write)

Tools that honor the Z Resolution environment will apply the z-resolution to output geodatasets. The z-resolution, expressed as a very small distance, refers to the number of significant digits used to store z-coordinate values.

Learn more about ZResolution.

String
ZTolerance
(Read and Write)

Tools that honor the Z Tolerance environment will override the default z-tolerance on geodatasets created in a geodatabase.

Learn more about ZTolerance.

String

Related topics