AnsweredAssumed Answered

ArcGIS Pro Python: Open/view layout within project?

Question asked by NZGeoCAD on Dec 22, 2019

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

Outcomes