Select to view content in your preferred language

arcpy: changing a grid spatial projection in a layout

109
0
3 weeks ago
Labels (1)
PeterT_Brisbane
Frequent Contributor

I have a UTM grid within my map frame, and I would like to use arcpy to change its projection.

As far as I can see that can only be done with a CIM definition.

I'm getting an error. Any ideas? Or am I on the wrong path?

....
cim_mapframe = first_mapframe.getDefinition('V3')
cim_mapframe.grids[0].projectedCoordinateSystem = arcpy.SpatialReference(7854)
first_mapframe.setDefinition(cim_mapframe)
 
I get an error when on the setDefinition line. 
 
AttributeError: SpatialReference: Get attribute X does not exist
Peter T, Brisbane
0 Kudos
0 Replies