<?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: Python Code is running out of order? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506248#M85645</link>
    <description>&lt;P&gt;I do think you're on to something about it attempting to update but then being missed. As the code runs I see the layer extent changing before the symbology and title are updated, even though I have the symbology and title update prior to the layer extent in the code.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2024 17:52:20 GMT</pubDate>
    <dc:creator>MDPWSB</dc:creator>
    <dc:date>2024-07-17T17:52:20Z</dc:date>
    <item>
      <title>Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506206#M85638</link>
      <description>&lt;P&gt;Hi Everyone! I am in the process of automating a layout and have the code up and running for the most part. The problem I'm having is that although I have the layout exporting to PDF at the end of the code, it seems my layout is exporting before the symbology and title update and I'm not sure why. My code is not in a for loop and the layout updates the symbology and title once the code finishes executing. Any thoughts? Not able to share code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 15:54:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506206#M85638</guid>
      <dc:creator>MDPWSB</dc:creator>
      <dc:date>2024-07-17T15:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506214#M85640</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/803959"&gt;@MDPWSB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you're not able to share code it makes it a little tricky, there is a possibility that the symbology and title may attempting to update, but is updating it to something that could be missed and it is completing "normally". Are there any try except catches in your code that could be passing that portion?&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;If this is in a Notebook, I would try to separate the for loop with static data, and test a single run to ensure that it is doing what it should do. If it is not in a Notebook, you may try using another Python document to attempt and use static data to run this only once with the same data, and have it end with the title change, just to be sure it's not skipping.&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 16:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506214#M85640</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-07-17T16:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506246#M85644</link>
      <description>&lt;P&gt;Hi Cody,&lt;/P&gt;&lt;P&gt;I am currently running a single block of code, not a for loop. I am using the Python window in ArcGIS Pro. The code shows no errors, but it seems the layout is exported before or faster than it takes the symbology and title to update. I've tried switching the order of commands but to no effect.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 17:47:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506246#M85644</guid>
      <dc:creator>MDPWSB</dc:creator>
      <dc:date>2024-07-17T17:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506248#M85645</link>
      <description>&lt;P&gt;I do think you're on to something about it attempting to update but then being missed. As the code runs I see the layer extent changing before the symbology and title are updated, even though I have the symbology and title update prior to the layer extent in the code.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 17:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506248#M85645</guid>
      <dc:creator>MDPWSB</dc:creator>
      <dc:date>2024-07-17T17:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506253#M85647</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/803959"&gt;@MDPWSB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I missed that part seemingly about it not being in a for loop, that was my bad. Would it be possible to separate the title and symbology change to its own function and checking if that runs normally?&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 18:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506253#M85647</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-07-17T18:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506287#M85652</link>
      <description>&lt;P&gt;Hi Cody,&lt;/P&gt;&lt;P&gt;so it seems that all I needed to do was add an aprx.save() at the end of each of those blocks of code for it to work and show on the PDF. So this problem is solved however I have another problem now. Instead of the label in the legend being replaced with the next area I'm mapping in the layout, it just adds the new polygon to the legend with the previous ones. I'm also afraid to keep touching this code lol.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;I think I also solved this problem. I think I have to delete each feature layer after each PDF is exported&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 19:21:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506287#M85652</guid>
      <dc:creator>MDPWSB</dc:creator>
      <dc:date>2024-07-17T19:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python Code is running out of order?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506315#M85653</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/803959"&gt;@MDPWSB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great stuff! Glad you got it fixed!&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 20:06:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-is-running-out-of-order/m-p/1506315#M85653</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-07-17T20:06:28Z</dc:date>
    </item>
  </channel>
</rss>

