AnsweredAssumed Answered

Why doesn't Python script add output automatically to map?

Question asked by yourbestbet77 on Nov 24, 2014
Latest reply on Nov 25, 2014 by recurvata

This is the first Python script I've written in a few years, so this is probably a rookie question.


I wrote this script that creates 3 different buffers around a point shapefile, and it works, but doesn't automatically add the buffers to the map, it just saves them in the specified workspace. In my Geoprocessinng options I have it set to add outputs to map and it works with all ESRI tools but not my script. Any ideas? Thanks in advance!


Here is my script:


# Script Name: EpicenterBuffers
# Description: Creates 10, 50, and 100 KM
#              buffers around an epicenter
# Created By:  Kirstyn Pittman
# Date:        11/24/14

import arcpy
arcpy.env.workspace = r"H:\Drafting Department\Python\EpicenterBuffers"
shp = "Location"
distanceList = ["10 kilometers","50 kilometers","100 kilometers"]
# Loop through each distance in the distanceList
for dist in distanceList:
    outName = shp+"_"+dist
    arcpy.Buffer_analysis(shp, outName, dist)
print "Finished Buffering"