>>> import arcpy
>>> mxd = arcpy.mapping.MapDocument(r"CURRENT")
>>> arcpy.mapping.ExportToPNG(mxd, r"Z:\test\test2.png", "PAGE_LAYOUT", 1600, 2400, 400)
Maybe issue can be easy one but i've no clue for now.
The code above work perfectle as
but when i try outside from mapdoc from file as below i'm losing annotations. Labels seems fine. Any idea for this behaviour? Any idea for source of difference ?
import arcpy
mxd = arcpy.mapping.MapDocument(r"Z:\test\test.mxd")
arcpy.mapping.ExportToPNG(mxd, r"Z:\test\test.png", "PAGE_LAYOUT", 1600, 2400, 400)
Solved! Go to Solution.
As a follow-up, I examined the data and I don't think this particular issue has to do with ExportToPNG. The annotation symbolIDs for each annotation element did NOT exist in the symbol collection and is why they were appearing as red rectangles. When I recalculated the IDs to match something that did exist, both export from CURRENT and stand-alone worked as expected. Yusuf is looking into why the correct symbols are not in the collection.
Jeff
I can not reproduce with my own data. Would it be possible for you to send a map package to jbarrette@esri.com? I'm hopeful it is an isolated issue. ExportToPNG has been around for a long time.
Thanks,
Jeff
As a follow-up, I examined the data and I don't think this particular issue has to do with ExportToPNG. The annotation symbolIDs for each annotation element did NOT exist in the symbol collection and is why they were appearing as red rectangles. When I recalculated the IDs to match something that did exist, both export from CURRENT and stand-alone worked as expected. Yusuf is looking into why the correct symbols are not in the collection.
Jeff