Hi,
I am attempting to change the map properties of my ArcGIS Pro Map using ArcPy, though I am struggling to find out how.
target_crs = arcpy.SpatialReference(32632)
arcpy.env.OutputCoordinateSystem = target_crs
arcpy.env.geographicTransformation = target_crs
Tried these and have yet to succeed, any ideas?
Cheers,
Stewart
Did you have a look at
Map—ArcGIS Pro | Documentation
spatialReference
(Read and Write)
Provides the ability to get or set the SpatialReference associated with the map.
SpatialReference
transformations
(Read Only)
Returns the horizontal and vertical transformations associated with the map as a Python Dictionary. The dictionary key for horizontal transformations is 2D and 3D for vertical transformations. To modify the existing transformations, use updateTransformations.
and
updateTransformations (transformations)
The updateTransformations method replaces a map's transformations using a dictionary.
Thanks! My solution was found through your link which linked into a different one.
map_view = arcpy.mp.ArcGISProject("CURRENT").listMaps("Map")[0]
map_view.spatialReference = arcpy.SpatialReference(32632)
aprx = arcpy.mp.ArcGISProject("CURRENT")
aprx.save()