Arcpy Dataframe

Discussion created by djriff on Sep 7, 2011
Latest reply on Sep 21, 2011 by deleted-user-1T_bOHag6M8d
Hi everyone, i'm trying to make a script that does the following

Pulls the coordinates from the active dataframe and inputs them into a polygon for a preselected feature class. In addition populates certain attribute fields from data saved in the MXD such as scale and creation date. Also there are some other particulars in the fields that I want calculate such as Producer, Notes, Product Type, Country Code. I've taken a look at Dataframe Extent under Arcpy and was wondering if it was possible to pull the current extent from the active dataframe. Looking at the example code I made a theory of using the "Current" command to pull the coordinates.

df = arcpy.mapping.ListDataFrames(mxd)[0]
newExtent = df.extent
newExtent.XMin, newExtent.YMin = -180.0, -90.0
newExtent.XMax, newExtent.YMax = 180.0, 90.0
df.extent = newExtent

That's the example code I found located at  Any help and advice and help is greatly appreciated.