<?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: MapSeries Export to JPEG Issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328013#M68611</link>
    <description>&lt;P&gt;Can you explain the what you mean by export from the layout object?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2023 21:44:06 GMT</pubDate>
    <dc:creator>ScoutStanley</dc:creator>
    <dc:date>2023-09-12T21:44:06Z</dc:date>
    <item>
      <title>MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327944#M68603</link>
      <description>&lt;P&gt;Hi, I am having a hard time figuring out how to get my script to export the layout as .jpg. The p&lt;SPAN&gt;urpose of the script is that it loops through table and creates new layout based on the row value and then exports that layout. The script works perfectly with exportToPDF, but I can't figure out how to get exportToJPEG to work. Any ideas???&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print("\n\tExporting map to pdf...")

        finallocationwithPIN = path.join(finallocation, PIN)
        if path.exists(finallocationwithPIN):
            remove(finallocationwithPIN)

        else:
            pass
        if not lyt.mapSeries is None:
            ms = lyt.mapSeries
            lyt.mapSeries.refresh()
            if ms.enabled:
                ms.currentPageNumber = ms.getPageNumberFromName(PIN)
                ms.exportToPDF(finallocationwithPIN)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 20:30:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327944#M68603</guid>
      <dc:creator>ScoutStanley</dc:creator>
      <dc:date>2023-09-12T20:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327964#M68606</link>
      <description>&lt;P&gt;what does print(finallocationwithPIN) return?&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 20:59:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327964#M68606</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-09-12T20:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327969#M68607</link>
      <description>&lt;P&gt;It returns the final location of where I want the layouts exported to.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 21:03:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327969#M68607</guid>
      <dc:creator>ScoutStanley</dc:creator>
      <dc:date>2023-09-12T21:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327971#M68608</link>
      <description>&lt;P&gt;When I run script with&amp;nbsp; exportToJPEG, the error I get is..&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;AttributeError: 'MapSeries' object has no attribute 'exportToJPEG'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print("\n\tExporting map to pdf...")

        finallocationwithPIN = path.join(finallocation, PIN)
        if path.exists(finallocationwithPIN):
            remove(finallocationwithPIN)

        else:
            pass
        if not lyt.mapSeries is None:
            ms = lyt.mapSeries
            lyt.mapSeries.refresh()
            if ms.enabled:
                ms.currentPageNumber = ms.getPageNumberFromName(PIN)
                ms.exportToJPEG(f'{finallocationwithPIN}.jpg')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 21:33:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1327971#M68608</guid>
      <dc:creator>ScoutStanley</dc:creator>
      <dc:date>2023-09-12T21:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328010#M68610</link>
      <description>&lt;P&gt;The MapSeries itself has no exportToJPEG method is what's going on. What you're supposed to do is set the map series current page (as you are doing) and then export from the Layout object. I believe that means your last line should be:&lt;/P&gt;&lt;PRE&gt;lyt.exportToJPEG(finallocationwithPIN)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 21:43:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328010#M68610</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-09-12T21:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328013#M68611</link>
      <description>&lt;P&gt;Can you explain the what you mean by export from the layout object?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 21:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328013#M68611</guid>
      <dc:creator>ScoutStanley</dc:creator>
      <dc:date>2023-09-12T21:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328015#M68612</link>
      <description>&lt;P&gt;Take a look at example 2 here:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapseries-class.htm" target="_blank"&gt;MapSeries—ArcGIS Pro | Documentation&lt;/A&gt;. It's quite similar (I think) to what you're hoping to do.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 21:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328015#M68612</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-09-12T21:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328017#M68613</link>
      <description>&lt;P&gt;In your example the layout object is the "lyt" object. Instead of using the mapseries in your loop, you just export the layout because after you set the active page the layout object holds that page.&lt;/P&gt;&lt;P&gt;So instead of the last line being "ms.exportToJPEG" it would be "lyt.exportToJPEG"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the formatting I'm on mobile&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 21:49:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328017#M68613</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2023-09-12T21:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: MapSeries Export to JPEG Issue</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328241#M68624</link>
      <description>&lt;P&gt;AH I see! Thank you for pointing out issue so clearly!! I was so deep in the weeds I was missing the obvious! Much appreciation!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 13:11:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-export-to-jpeg-issue/m-p/1328241#M68624</guid>
      <dc:creator>ScoutStanley</dc:creator>
      <dc:date>2023-09-13T13:11:46Z</dc:date>
    </item>
  </channel>
</rss>

