<?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: Update dynamic text before exporting in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578354#M6300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm surprised that the dynamic text doesn't update before exporting - it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following script updates dynamic text (current time) between exports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r'C:/junk/time_test.mxd')
arcpy.mapping.ExportToPDF(mxd, r"C:/junk/time_test1.pdf") #comment on 2nd run
#arcpy.mapping.ExportToPDF(mxd, r"C:/junk/time_test2.pdf") #uncomment on 2nd run
del mxd&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose I'm confused by this statement: "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The script does all the exporting and ordering of pages&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;, so the .mxd never actually opens to update the dynamic text." Can you post your script?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:51:13 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2021-12-12T00:51:13Z</dc:date>
    <item>
      <title>Update dynamic text before exporting</title>
      <link>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578353#M6299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python script that complies several pdf documents (exported from ArcMap) into a map book.&amp;nbsp; The first page uses a pdf which is exported from a mxd that has dynamic text for the date.&amp;nbsp; The script does all the exporting and ordering of pages, so the .mxd never actually opens to update the dynamic text.&amp;nbsp; Right now, I have to open the title page mxd and close it (to update the dynamic text) and then run the script.&amp;nbsp; Any way to skip that step to update the dynamic text?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 20:46:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578353#M6299</guid>
      <dc:creator>ClintOffutt</dc:creator>
      <dc:date>2015-04-20T20:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Update dynamic text before exporting</title>
      <link>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578354#M6300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm surprised that the dynamic text doesn't update before exporting - it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following script updates dynamic text (current time) between exports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r'C:/junk/time_test.mxd')
arcpy.mapping.ExportToPDF(mxd, r"C:/junk/time_test1.pdf") #comment on 2nd run
#arcpy.mapping.ExportToPDF(mxd, r"C:/junk/time_test2.pdf") #uncomment on 2nd run
del mxd&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose I'm confused by this statement: "&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The script does all the exporting and ordering of pages&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;, so the .mxd never actually opens to update the dynamic text." Can you post your script?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:51:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578354#M6300</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-12T00:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update dynamic text before exporting</title>
      <link>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578355#M6301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This morning it worked...however I deleted the old, final output pdf.&amp;nbsp; I am sure in the past, the export will overwrite the old pdf, but yesterday it was showing the date from the previous time I ran it.&amp;nbsp; Not sure if that was the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYT.mxd")&lt;/P&gt;&lt;P&gt;arcpy.mapping.ExportToPDF (mxd, "C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYT.pdf")&lt;/P&gt;&lt;P&gt;del mxd&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.mxd")&lt;/P&gt;&lt;P&gt;arcpy.mapping.ExportToPDF (mxd, "C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.pdf")&lt;/P&gt;&lt;P&gt;del mxd&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYD.mxd")&lt;/P&gt;&lt;P&gt;arcpy.mapping.ExportToPDF (mxd, "C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYD.pdf")&lt;/P&gt;&lt;P&gt;del mxd&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBACK.mxd")&lt;/P&gt;&lt;P&gt;arcpy.mapping.ExportToPDF (mxd, "C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBACK.pdf")&lt;/P&gt;&lt;P&gt;del mxd&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL.mxd")&lt;/P&gt;&lt;P&gt;mxd.dataDrivenPages.exportToPDF ("C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL.pdf","ALL","","PDF_MULTIPLE_FILES_PAGE_INDEX",600)&lt;/P&gt;&lt;P&gt;del mxd&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR.mxd")&lt;/P&gt;&lt;P&gt;mxd.dataDrivenPages.exportToPDF ("C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR.pdf","ALL","","PDF_MULTIPLE_FILES_PAGE_INDEX",600)&lt;/P&gt;&lt;P&gt;del mxd&lt;/P&gt;&lt;P&gt;PDF = arcpy.mapping.PDFDocumentCreate (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORY.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYT.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYD.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_1.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_1.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_2.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_2.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_3.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_3.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_4.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_4.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_5.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_5.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_6.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_6.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_7.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_7.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_8.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_8.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_9.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_9.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_10.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_10.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_11.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_11.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_12.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_12.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_13.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_13.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_14.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_14.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_15.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_15.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_16.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_16.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_17.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_17.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_18.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_18.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_19.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_19.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYL_20.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYR_20.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBLANK.pdf")&lt;/P&gt;&lt;P&gt;PDF.appendPages (r"C:\MITCHELL COUNTY GIS\RURAL DIRECTORY\RURAL DIRECTORYBACK.pdf")&lt;/P&gt;&lt;P&gt;PDF.updateDocProperties&lt;/P&gt;&lt;P&gt;PDF.saveAndClose&lt;/P&gt;&lt;P&gt;del PDF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2015 12:50:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578355#M6301</guid>
      <dc:creator>ClintOffutt</dc:creator>
      <dc:date>2015-04-21T12:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update dynamic text before exporting</title>
      <link>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578356#M6302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this is probably ancient history for you, but I have this exact problem.&amp;nbsp; When i run the ExportToPDF code my Dynamic Text is not updated. I have the "Document Path" on my map, and it still says the date from the last time the MXD was opened on it no matter how many times i run the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 13:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/578356#M6302</guid>
      <dc:creator>CaseyPetty1</dc:creator>
      <dc:date>2016-06-03T13:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update dynamic text before exporting</title>
      <link>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/1143667#M8439</link>
      <description>&lt;P&gt;Even more ancient at this point... But I found this thread having a similar problem. My solution was to loop through text elements containing "&amp;lt;dyn" and setting the visibility to false then true again, that updated the current date field that I was interested in. (This was in ArcGIS Pro 2.8.2)&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 16:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/update-dynamic-text-before-exporting/m-p/1143667#M8439</guid>
      <dc:creator>RossVolkwein1</dc:creator>
      <dc:date>2022-02-14T16:29:08Z</dc:date>
    </item>
  </channel>
</rss>

