Stop export Layout

186
5
2 weeks ago
Status: Needs Clarification
Labels (1)
MarcelSt-Germain
Occasional Contributor III

Since from version 3.1 Export Layout take forever (30 to 60 min) to parse Preparing export in place of few minutes., make the ability to stop the process when seeing a problem after clicking the Export button.

For now, all the process of Preparing export have to go before the Stop button became available.  With versions before 3,1 it wasn't a problem since the phase preparing export doesn't take forever but not, please activate the stop at the beginning of the process.

5 Comments
JeremyWright
Status changed to: Needs Clarification

Hi Marcel,

This step in the export process is making a copy of the persistence of the item being exported, so it can happen in the background and not block the UI.

Unfortunately it sounds like you've run into a situation where that process is taking too long...

It'd be great if we could get the repro case from you as a PPKX (share->Project package) - I can reach out separately to get your email and we can set up an ad-hoc FTP share to get your repro.

In the meantime, you can workaround this issue by exporting using the Python window with the ArcPy.MP API (which won't make a copy before exporting) to export the map or scene or layout you're using.  

Also be aware there have been many bug fixes and performance enhancements in releases since 3.1 - it might be worth considering updating to 3.2.2 to see if the problem has been resolved since then.

 

Looking forward to hearing from you!

 

Regards,

Jeremy W.

MarcelSt-Germain

@JeremyWright 

Hi Jeremy, 

That's the problem. We can't  this process who now take forever.  What I ask for, since ESRI introduce this bug in 3,1 is the ability to make available the stop at the beginning not just after the preparing phase is done.  Pro works well in export in PDF from 2,0 to 3,0.  Before I don't know since It was not useful to make maps, so we have to wait for 2.x to start trying it.

For the bug itself, I already send a package to support last year or the year before, and the bug is file but, to 3.2.2 not resolve.  

For now my only way to stop the process if I saw a mistake when activate the export is to kill the process.  Not a nice way to go.

When I need to make many export, I have to remove the current version and reinstall 3.0.x.  The the same project who take between 30 min to more than on hour take the normal 5 to 10 min to preparing and export the same layout.

So, again, make the stop button available at the beginning.

JeremyWright

@MarcelSt-Germain I understand. 

I am working with support to try and find the data shared last year with the support analyst, so we can get to the bottom of why this particular map/layout causes this problem.

In the meantime I can talk with the team responsible for this UI to see if there's any other workaround we can provide - I agree it's infuriating when the stop/cancel button is not honored!

JeremyWright

Hi @MarcelSt-Germain sorry for the delay.  Here's an update on this:

 

1) The Layout team has a bug in their backlog to investigate ways to make the "preparing to export" phase more cancellable.

2) I reached out to support, unfortunately they were not able to recover the repro case you gave them due to a failure of the machine's storage.  Unfortunately this means that the repro case you sent was not able to be used by Development to debug the problem.  If possible we'd like to receive this repro package again.   I can send you an ad-hoc FTP server info if you are willing to upload it again.

3) Layout team also confirmed that at this time there is no way to avoid the "preparing to export" phase, but a suggested workaround is to export using the python window.  Below I've pasted a simple example script to export a layout using Python.

The difference in using Python is that it does NOT require the clone - it exports directly from the already-opened view.  So it's worth a shot for sure in this particular case.

sample python commands to export to PDF from current layout.  You can paste this into the Python window when you have the layout you want to export open in Pro.

Replace the path with your desired values.

 

##Export to PDF
import time
aprx = arcpy.mp.ArcGISProject("CURRENT")
aprx.listLayouts()
for lyt in aprx.listLayouts():
#Parameters: output name, resolution, image quality, compress vector graphics, image compression, embed fonts, layer attributes, georeference, jpeg compression, clip to elements, output as image, embed color profile
#Image quality: "BEST", "BETTER", "NORMAL", "FASTER", "FASTEST"
#Image compression: "ADAPTIVE", "DEFLATE", "JPEG", "LZW", "NONE", "RLE"
#Layer attributes: "LAYERS_ONLY", "LAYERS_AND_ATTRIBUTES", "NONE"
start = time.time()
lyt.exportToPDF(f"C:\Temp\{lyt.name}.pdf", 150, "BEST", True, "ADAPTIVE", True, "LAYERS_ONLY", True, 80, False, False, False)
end = time.time()
print(f"{lyt.name} exported in {end - start} seconds")
print("Done")

MarcelSt-Germain

@JeremyWright 

Hi,

To much time lost.  I return to the 3,0 since the bug was intro in 3,1.  Try the 3,3 to see if it was corrected but, no time to loose since now we can't remove maps in the catalog.