Is there a way to set the scale of the layout view in Pro, similar to ArcMap?
For example in Arcmap
lyr = arcpy.mapping.ListLayers(mxd, "lyr")[0]
df.extent = lyr.getSelectedExtent()
df.scale = 24000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
In pro I can't seem to get set
aprx = arcpy.mp.ArcGISProject("CURRENT")
map = aprx.listMaps()[0]
#lyr = map.listLayers("SUBJECT_PROPERTY")[0]
lyt = aprx.listLayouts("Map")[0]
mf = lyt.listElements("MAPFRAME_ELEMENT")[0]
#mf.camera.setExtent(mf.getLayerExtent(lyr, False, True))
ext = map.defaultCamera.getExtent()
mf.camera.scale *= 1.25 #some how set this to 1:24,000
Steps are given below-
Do one of the following to choose Properties. On the menu, choose Modify > Properties.
Select the edge of the layout viewport.
In Custom Scale, enter the scale at which you want to view model space entities from within the layout viewport.
Click OK.
Regards,
Rachel Gomez
After trying your suggestion but, but after I run the code the zoomed scale changed.
I am curious to see how people, if anyone is getting zoomed scale like in Arcmap with Python.