AnsweredAssumed Answered

Extent to xy coordinate- arcpy

Question asked by yaron148 on Jan 8, 2015
Latest reply on Jan 8, 2015 by ad_giles@hotmail.com

Hellow

i try to extent to xy coordinate with arcpy? i using this code:

 

import arcpy, os, sys
from arcpy import env

env
.workspace = r"C:\Project"
pnt
= '178434 ,662446'
for mxdname in arcpy.ListFiles("*.mxd"):
  
print mxdname
  mxd
= arcpy.mapping.MapDocument(r"C:\Project\\" + mxdname)
  df
= arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
  df
.extent = pnt
  
print 'extent'
  mxd
.save()
del mxd

 

but i get en error: ValueError: Invalid string value for Extent argument

any help would be great

Outcomes