Select to view content in your preferred language

ExportToPDF with Selection in ArcMap

1892
3
Jump to solution
03-06-2012 05:28 PM
by Anonymous User
Not applicable
Original User: WestonSF

I've noticed something odd happening when exporting to PDF using python.

I have an ArcMap document with a parcels layer and a current selection made of one particular parcel. I have changed the selection colour from the standard ArcMap cyan to a yellow, so it looks like this when you make a selection:

[ATTACH=CONFIG]12466[/ATTACH]

When I run a python command like this from ArcMap:

import arcpy
mxd = arcpy.mapping.MapDocument(r"ReportMap.mxd")
arcpy.mapping.ExportToPDF(mxd, r"Report.pdf")


The PDF is fine with the yellow selection showing. But when I run this script when ArcMap is not open the selection colour in the PDF reverts back to cyan for some reason:

[ATTACH=CONFIG]12467[/ATTACH]

I don't know why that happens? I guess something needs to be set in the ExportToPDF parameters?
0 Kudos
1 Solution

Accepted Solutions
JeffBarrette
Esri Regular Contributor
I assume you set the selection symbol via the main selection menu --> selection options.  Try setting your selection symbol at the layer level via the ayer properties symbology tab.  I just confirmed this and it works.

Jeff

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable
Original User: mzcoyle

Changing the default highlighting colour is stored in the normal.mxt I believe, not the mxd. I imagine this parameter won't be read when running outside an ArcMap session.
0 Kudos
JeffBarrette
Esri Regular Contributor
I assume you set the selection symbol via the main selection menu --> selection options.  Try setting your selection symbol at the layer level via the ayer properties symbology tab.  I just confirmed this and it works.

Jeff
0 Kudos
by Anonymous User
Not applicable
Original User: WestonSF

Thanks for the replies.

I changed the selection colour in layer properties as Jeff suggested and it worked!

[ATTACH=CONFIG]12490[/ATTACH]
0 Kudos