Select to view content in your preferred language

ArcGIS Pro Python: Open/view layout within project?

788
1
12-22-2019 01:38 PM
GeoNZ
by
Frequent Contributor

There is a method (importDocument('path to pagx') to import a layout into a document. This imports it into the project but does not show the layout by default so a user may not know that the layout had been added (i.e. it requires use of the Catalog view in the UI to navigate to that layout and then view it).

Is there any method available to make a layout visible? Having access to this function would allow scripts to both open a layout (if not currently open in the main stage) and focus on a layout (if open as one of many tabs within the main stage).

i.e.

aprx = arcpy.mp.ArcGISProject("Current")

aprx.importDocument("path to pagx file")

layout = aprx.listLayouts('pagx layout I just imported")[0]

layout.visible = True

0 Kudos
1 Reply
DebbieGoeldner
Emerging Contributor

I have the same question. Did you figure it out?

0 Kudos