Hello,
I want to export a map series as jpgs and am trying to write a script. However, I am stuck in how to "call" the correct layout. There are 9 layouts in the aprx, however, there used to be more that were deleted. I am trying to find the right one by trial and error going through numbers. This is the code:
aprx = arcpy.mp.ArcGISProject(r"path.aprx")
lyt = aprx.listLayouts()[0]
print(lyt.name)
Is there a way to find out the number/position of the layout? I was thinking of something like that:
aprx = arcpy.mp.ArcGISProject(r"path.aprx")
for lyt in aprx.listLayouts():
print(lyt.name)
print(lyt.???)
Is there any property I can put in there to find out which position it has?
Thanks!