Spatial Reference

Discussion created by djriff on Nov 29, 2012
Latest reply on Nov 29, 2012 by arekmatoszka
Hi everyone,

i'm makeing a metadata tagging script using tagged text elements in my layout. I'm having an issue with pulling the coordinate system of the dataframe into a useable format.

this is basically what i'm running with at the moment.

import arcpy, os, sys, glob
mxdfile = "mxd path"
mxd = arcpy.mapping.MapDocument(mxdfile)
df = arcpy.mapping.ListDataFrames(mxd, "Ma*")
#Now here is where i get stuck, i'm trouble shooting trying to get a string result so i can put it into an attribute table
#I have tried the following and cannot seem to get past this part
print df.spatialReference
for el in arcpy.ListLayoutElements(mxd, "DATAFRAME_ELEMENT", "Ma*"):
  print el.spatialReference

#both attempts at this give me this return
<geoprocessing spatial reference object object at "mem location">

any ideas on how to achieve what i'm going for?