Access and set the pitch, roll, and heading using arcpy

07-27-2023 07:46 AM
New Contributor II

Hello! I am creating a script using arcpy that will automatically output 3D maps. Currently, a good portion of the maps are being output straight down. I would like to adjust the angle but I am having trouble accessing the properties. Here is a link that I tried using:

Thank you!

0 Kudos
1 Reply
by Anonymous User
Not applicable

You were in  the Help\Interact with maps and scenes section of the docs. For arcpy, use this one.

import arcpy
aprx ="CURRENT")

m = aprx.listMaps("Yose*")[0] # use the map name you want
lyt = aprx.listLayouts("Main Attr*")[0] list the layout name
mf = lyt.listElements("mapframe_element", "Yosemite National Park")[0] # get the frame to set the heading ptich and roll = 4.0 = -30.0 = 36.0

maybe need an in there depending on your workflow.

0 Kudos