DataFrame Element Confusion

Discussion created by GWalters-esristaff Employee on Feb 15, 2011
Hi everyone,

I am have written a sample script that uses the arcpy.ExportToTiff funciton and here it is for your reference -

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.



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

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

print df.elementWidth