Currently there is no way to "refresh" a standard Layout object using the mp module. You can however refresh a mapseries.
import arcpy.mp as mp
# Current behavior for mapseries
project = mp.ArcGISProject("CURRENT")
layout = project.listLayouts()[0]
layout.mapSeries.refresh()
# Desired behavior for layouts
project = mp.ArcGISProject("CURRENT")
layout = project.listLayouts()[0]
layout.refresh()
Hi @JeffBarrette, thanks for your response. I will try to outline what the script does. It is a script tool being run within Pro. The important input to the tool is a point feature class that we update every day with points for residence addresses. We get daily map requests from our client to do a buffer analysis on residence points and see if there are businesses within a 25-mile radius to the residence points or if the point falls outside of that distance. I won't go over all of it but I will lay out the important parts.
The problem here is that the feature classes in the map layout that are being appended to (the buffer, the distance line, and the dissolved combination of the two) are not showing up in the PDF export after the new features for the current batch of new residence points have been generated and appended to them. As soon as the script is done running, then they will show up in the map if you refresh the layout, but by that point the PDFs have already been exported and the newly created features are not showing up in those exported PDFs.
Until a few months ago, this process ran smoothly and did not need workarounds for the PDFs to be generated correctly. Now I have to open up each APRX that the mapping loop saves for each map request and export the PDF from those one-by-one.
I hope this is helpful. If not maybe I can set up a call with tech support to show the process in action.
Thanks,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.