Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a collection of rasters that I'm writing code to automate clipping based on a user defined shapefile. I am currently doing this in the Python window using the following as the main processing function:

arcpy.Clip_management( inputRasterFilename, "#", outputRasterFilename, "shapefile" )

Basically I want to read the raster, clip it, and have it saved to outputRasterFilename for later use.

This is exactly what happens except that ArcGIS also adds the result of clip operation to the current map that I have open. Is there a way to disable this?

share|improve this question
This post on ESRI's forums asks the equivalent question of a way to do this programmatically using Python. The OP seems to indicate this was available in 9.3 via arcgisscripting and now he wants to do it in 10.0 via arcpy. – mindless.panda Jun 22 '11 at 16:53
This post on ESRI's forums gives a good workaround: always have the dialog disable and use the AddLayer function in the arcpy.mapping module to add outputs as needed. – mindless.panda Jun 22 '11 at 17:04
up vote 9 down vote accepted

You can change this setting in the MXD by clicking Geoprocessing|Geoprocessing Options and unclicking "Add results of geoprocessing operations to the display".

share|improve this answer
Thanks! Is there a way to set this programmatically? – mindless.panda Jun 21 '11 at 20:02
I know how to set it in .NET, but I don't know Python well enough yet for the correct syntax. – kenbuja Jun 21 '11 at 20:05

With ArcGIS 10.1 it is possible to disable add output to the application display with arcpy.env.addOutputsToMap = False

share|improve this answer

Here is ESRI's documentation for doing it in .NET:

share|improve this answer
-1: This has nothing to do with what the OP requested since they're using arcpy. They don't have access to the IGeoProcessor namespace (or any other .Net namespace, for that matter). Furthermore, it's not really "documentation for doing it", it's a link to a method that allows or disallows adding outputs within ArcObjects. – Michael Todd Jun 27 '11 at 21:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.