I am trying to create an external python program that, as a scheduled, automated job, could reach multiple ArcPRO projects in one folder and export their layouts to another folder. I haven't been able to find a satisfactory answer online, so I'm trying from scratch right now, I'm at:
import arcpy, os, sys
from arcpy import env
#Set workspace directory
workspace = r"\\ProjectsFolder"
env.workspace = workspace
#Output Location
PDFoutputLoc = r"\\OutputFolder"
#Open/reach into project
commall = workspace.listLayouts()
for layout in commall:
pdf_out = pdf_output + layout.name + ".pdf"
layout.exportToPDF(pdf_out)
#Export all layouts to PDF
#Close and repeat
and the error I'm hitting my head on a wall right now is:
line 17, in <module>
commall = workspace.listLayouts()
AttributeError: 'str' object has no attribute 'listLayouts'
What I think I'm interpreting from this is that it is saying the Layouts are not something that can't be listed. But that doesn't make sense.