AnsweredAssumed Answered

How can I alter this code to be stand alone using Tkinter?

Question asked by GisMapGirl on Jan 2, 2015
Latest reply on Jan 3, 2015 by xander_bakker

import arcpy

getShapeFile = arcpy.GetParameterAsText(0)

arcpy.Buffer_analysis(getShapeFile, bufferArea_shp, "500 Meters", "FULL", "ROUND", "ALL", "")

 

I am trying to use Tkinter to create an interface that will mimic the above python script. I do not know how to get the shapefile via navigating to it. I know I can use

filename = askopenfilename()

to grab a file but it is not really getting the shapefile. (may need to specify getting only file that ends in shp?)

 

I guess what I am really trying to figure out is how can I use an interface outside of ArcMap (i.e. a standalone script) to get the parameters I need? A pointer to some sample scripts would be helpful as well.

 

Thanks

Outcomes