<?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 printed layouts list to screen different than their DB order in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/printed-layouts-list-to-screen-different-than/m-p/1246282#M66456</link>
    <description>&lt;P&gt;I am running the following script, just printing each layout in the project and its elements (total of 3 layouts). The printout (code below) order is Layout 2, then 3 then 1. In the DB the Layouts listed 1&amp;gt;2&amp;gt;3 like I'll except it to be.&lt;/P&gt;&lt;P&gt;Why is it printing not in the order it is listed? How can I set it to print like these objects are maintained in the DB? the printout this code currently issues is listed below:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Project layouts and their elements list:&lt;BR /&gt;Layout2&lt;BR /&gt;Legend&lt;BR /&gt;North Arrow&lt;BR /&gt;Scale Bar&lt;BR /&gt;Map Frame&lt;BR /&gt;Layout3&lt;BR /&gt;Map Frame 2&lt;BR /&gt;Map Frame 1&lt;BR /&gt;Map Frame&lt;BR /&gt;Layout1&lt;BR /&gt;Map Frame&lt;BR /&gt;Finished printing all project layouts and their elements&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    print("Project layouts and their elements list:")
    for l in aprx.listLayouts():
        print (l.name)
        for el in l.listElements():
            print ("    " + el.name)
    print("Finished printing all project layouts and their elements\n")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 07 Jan 2023 18:09:21 GMT</pubDate>
    <dc:creator>BarakGarty</dc:creator>
    <dc:date>2023-01-07T18:09:21Z</dc:date>
    <item>
      <title>printed layouts list to screen different than their DB order</title>
      <link>https://community.esri.com/t5/python-questions/printed-layouts-list-to-screen-different-than/m-p/1246282#M66456</link>
      <description>&lt;P&gt;I am running the following script, just printing each layout in the project and its elements (total of 3 layouts). The printout (code below) order is Layout 2, then 3 then 1. In the DB the Layouts listed 1&amp;gt;2&amp;gt;3 like I'll except it to be.&lt;/P&gt;&lt;P&gt;Why is it printing not in the order it is listed? How can I set it to print like these objects are maintained in the DB? the printout this code currently issues is listed below:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Project layouts and their elements list:&lt;BR /&gt;Layout2&lt;BR /&gt;Legend&lt;BR /&gt;North Arrow&lt;BR /&gt;Scale Bar&lt;BR /&gt;Map Frame&lt;BR /&gt;Layout3&lt;BR /&gt;Map Frame 2&lt;BR /&gt;Map Frame 1&lt;BR /&gt;Map Frame&lt;BR /&gt;Layout1&lt;BR /&gt;Map Frame&lt;BR /&gt;Finished printing all project layouts and their elements&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    print("Project layouts and their elements list:")
    for l in aprx.listLayouts():
        print (l.name)
        for el in l.listElements():
            print ("    " + el.name)
    print("Finished printing all project layouts and their elements\n")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2023 18:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printed-layouts-list-to-screen-different-than/m-p/1246282#M66456</guid>
      <dc:creator>BarakGarty</dc:creator>
      <dc:date>2023-01-07T18:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: printed layouts list to screen different than their DB order</title>
      <link>https://community.esri.com/t5/python-questions/printed-layouts-list-to-screen-different-than/m-p/1246291#M66457</link>
      <description>&lt;P&gt;I could be wrong, but I think the 'display' order can be different than the created order and I suspect that these were created in the order that it is printing in. The TOC's/ panes are basically JSON files containing the object info and listLayouts is probably ordering the items by created order.&amp;nbsp; You could do a sort in the code to force them to be sequential.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2023 23:56:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printed-layouts-list-to-screen-different-than/m-p/1246291#M66457</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-01-07T23:56:20Z</dc:date>
    </item>
  </channel>
</rss>

