<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I call out a specific layout window to export? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270607#M67914</link>
    <description>&lt;P&gt;Is the script from a previous answer?&amp;nbsp; Unless I'm misinterpreting, you just need the syntax for an if statement?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy


docPath = r"*PATH*"
docName = r"Test.aprx"
layoutName = 'name of your layout'
p = arcpy.mp.ArcGISProject(docPath+"\\"+docName)
# ge a list of all layouts in your map dox
lLayout = p.listLayouts()
for l in lLayout:
    print(l.name)
    #if statement to print ONLY a specific layout
    if l.name == layoutName:
        l.exportToJPEG(docPath+"\\"+l.name)

print("Process Completed")&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 22 Mar 2023 20:15:10 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2023-03-22T20:15:10Z</dc:date>
    <item>
      <title>How do I call out a specific layout window to export?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270604#M67913</link>
      <description>&lt;P&gt;My current script is exporting all of my layout windows. Does anyone have an example of how I can export a specific layout window?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy


docPath = r"*PATH*"
docName = r"Test.aprx"
p = arcpy.mp.ArcGISProject(docPath+"\\"+docName)
# ge a list of all layouts in your map dox
lLayout = p.listLayouts()
for l in lLayout:
    print(l.name)
    #You could add an if statement to print ONLY a specific layout
    l.exportToJPEG(docPath+"\\"+l.name)

print("Process Completed")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 20:08:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270604#M67913</guid>
      <dc:creator>avonmoos</dc:creator>
      <dc:date>2023-03-22T20:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call out a specific layout window to export?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270607#M67914</link>
      <description>&lt;P&gt;Is the script from a previous answer?&amp;nbsp; Unless I'm misinterpreting, you just need the syntax for an if statement?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy


docPath = r"*PATH*"
docName = r"Test.aprx"
layoutName = 'name of your layout'
p = arcpy.mp.ArcGISProject(docPath+"\\"+docName)
# ge a list of all layouts in your map dox
lLayout = p.listLayouts()
for l in lLayout:
    print(l.name)
    #if statement to print ONLY a specific layout
    if l.name == layoutName:
        l.exportToJPEG(docPath+"\\"+l.name)

print("Process Completed")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Mar 2023 20:15:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270607#M67914</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-03-22T20:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I call out a specific layout window to export?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270610#M67915</link>
      <description>&lt;P&gt;I found the example through Google and noticed the if statement comment after I had posted this. Thanks for the quick response.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 20:19:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-call-out-a-specific-layout-window-to/m-p/1270610#M67915</guid>
      <dc:creator>avonmoos</dc:creator>
      <dc:date>2023-03-22T20:19:48Z</dc:date>
    </item>
  </channel>
</rss>

