Using the arcpy.mp module to access and export maps from an ArcGIS Pro project.
I have been able to figure out how to manipulate layouts, mapframes and cameras etc to zoom and scale the display, but I can't figure out yet how to set or change the reference scale of a given map?
I can obviously do this manually within Pro itself, but I can't find a property on the Map object or anywhere that allows me to set this?
Can anyone point me in the right direction?
So you are looking in all the right sections. Even if you can read a property doesn't mean you can set something else that might emulate what you are looking for. There are many read-only properties and fewer read/write ones.
If it were there, I would expect it in the arcpy.mp.Map class:
It is clearly not there. I don't see it in the .NET SDK either.
UPDATE It is there now with ArcGIS Pro 2.4 on the Map object properties.
Thanks Curtis - I agree that the 'Map' class is where I would expect it to be and it is not.
Although I also thought possibly it would be on the 'MapFrame' class??
In the arcpy.mapping module, it is present on the 'DataFrame' class as a property that can be set. So I'm picking that it is something that has just not been exposed yet in the mp module. Hopefully they will add it at some point soon. In the scheme of things, should be relatively easy as we know that the property already exists (because we can manipulate it manually within Pro itself).
Be sure and log an idea or post a tech support incident on this. The squeaky wheel gets the grease; over the years I've seen a lot of good ideas from me and my colleagues show up in the software.
in ArcMap 10.6.1
(using the new arcpy.mapping module NOT arcpy.mp)
as a bonus:
arcpy.mapping.MapDocument("CURRENT").activeDataFrame.referenceScale = "1:1000"
will set the Current Reference Scale to 1000 and Refresh the ActiveView.
arcpy.mapping.MapDocument("CURRENT").activeDataFrame.referenceScale = "1:0"
will Clear the Current Reference Scale and Refresh the ActiveView.