There is a method in arcpy to import a layout into a ArcPro document (aprx.importDocument('path to pagx').
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/open it).
There are also other project items which it would be useful to have arcpy control over their visibility status in the main stage (i.e. maps, scenes)
Please add a property on maps, layouts, scenes etc to control their visibility.
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 # This will show the layout in the main stage
layout.visible = False # This will remove the layout from the main stage, but still keep it in the project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.