DataFrame Element Confusion

661
0
02-15-2011 06:26 PM
GarethWalters
Occasional Contributor III
Hi everyone,

I am have written a sample script that uses the arcpy.ExportToTiff funciton and here it is for your reference - http://resources.arcgis.com/gallery/file/arcpad/details?entryID=ADD60502-1422-2418-7F4B-94C5430ABF67

My problem is that when I wrote it I only did so for projected maps as I calculated the new extent of the data View. The weird thing looking further into this is that I should be able to simplify my code by using the dataframe.elementWidth and elementHeight. So why do these two values get passed from the Layout View data frame where the displayunits and the mapUnits are based on the Data View?  I really hope that there is something I am missing, as this doesn't make sense to me. I am relatively new to gp scripting but I think my testing is correct:

So how can I tell if the map is in cm, inches or points?


Thanks your any help.

Cheers,

Gareth

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Temp\testDEcDeg.mxd")
for df in arcpy.mapping.ListDataFrames(mxd):
    print df.name

for elm in arcpy.mapping.ListLayoutElements(mxd,"DATAFRAME_ELEMENT"):
    print elm.name


print df.elementWidth
0 Kudos
0 Replies