Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I just need a quick fix here.
Having trouble finding a way to allow the user to input the new output file name (the one that is created after the buffer function completes). Any ideas?
I am also not sure if I created the variables correctly.

Using the latest (ArcGIS 10.1 SP1)

python script to change point layer to a 50 m buffer layer change the output file name to whatever so it can make a new one

import arcpy  
arcpy.env.workspace="C:/Users/oxana/Desktop/David"  
arcpy.Buffer_analysis("builteditptFT", "c:/users/oxana/desktop/david/PDpyth1","50   meters","FULL","ROUND","LIST")

note that this only buffers from the point layer that was converted from the centroids of the newly created buildings
it is prone to generalizing around each point because the buffer radiates 50 meteres from the center of each building (not the outsides)

share|improve this question
3  
10.3, are you from the future? :) –  blah238 May 25 '13 at 19:17
    
While artworks answer is the way to go while working with AG, a raw input line would look like (from cmd):myScript.py testing.txt and accessed through sys.argv[0] –  Tom May 27 '13 at 6:17

1 Answer 1

You have a few options for this:

  1. Insert your geoprocessing flow into ModuleBuilder and right click on the Output object and make it a model parameter, save your model and run it. You should get a option asking for the name/path of the output layer.
  2. Create a script tool and define your output parameter.
  3. Use Tkinter module to grab user input value, see this example.
share|improve this answer
2  
+1 for a script tool, sounds like a perfect candidate –  Chad Cooper May 25 '13 at 17:53

Your Answer

 
discard

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.