Select to view content in your preferred language

Enable Export of All Layouts to Independent Folder via Scripting

306
3
08-07-2024 09:32 AM
Status: Closed
Labels (1)
SamuelRomero2
Emerging Contributor

I would like to suggest adding the capability to export all layouts in an ArcGIS Pro project to an independent folder via scripting. This feature would greatly enhance workflow efficiency by allowing users to automate the process of saving layouts as .pagx files. Currently, this process must be done manually, which can be time-consuming for projects with multiple layouts. Automating this task would streamline project management and improve productivity.

3 Comments
JeffBarrette

@SamuelRomero2, I'm not sure if I'm understanding this correctly because this can be scripted using arcpy.mp. Please let us know if the following snippet isn't what you are looking for.

 

import os
customPath = r'C:\Temp'

p = arcpy.mp.ArcGISProject('current')
for lyt in p.listLayouts():
    lyt.exportToPAGX(os.path.join(customPath, lyt.name))

Jeff - Layout and arcpy.mp teams

SamuelRomero2
Hi Jeff,

Thanks for your prompt reply.
I tried your script and was successful.

My research had eluded to no capability for this.
We're still attempting to fine tune our workflow in maintaining ongoing reports.

Thanks again for your assistance.

AubriKinghorn
Status changed to: Closed