Setting Output Extent (Environment Setting) using ArcPy?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to figure out how to set my output extent before creating Thiessen Polygons in a loop of ~100 points shapefile. (ArcMap 10.0 - Python)

for i in range(3,51,1): arcpy.CreateThiessenPolygons_analysis("AVF%i" % i,"AVF%iVoronoi" % i,"ONLY_FID")Basically I want my extent to be the same for each iteration.

I first found:

arcpy.Extent(293490,5898230,316430,5930230)then someone told me about this ESRI help page:

#use 'CURRENT' if running from ArcMap, when published use MXD on disk mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] newExtent = df.extent newExtent.XMin, newExtent.YMin = 293490,5898230 newExtent.XMax, newExtent.YMax = 316430,5930230 df.extent = newExtentbut in any case, when I run my loop, the size of the output is not reflecting the changes.

ps: http://stackoverflow.com/questions/8996965/output-extent-environment-setting/8997122#8997122



أكثر...
 
أعلى