laptop and a wrench

Bug

The updated symbology is not applied to the exported PDF when running a script tool.

Last Published: December 8, 2021 ArcGIS Pro
Bug ID Number BUG-000142773
SubmittedSeptember 8, 2021
Last ModifiedJune 5, 2024
Applies toArcGIS Pro
Version found2.8.2
Operating SystemWindows OS
Operating System Version10.0
StatusNon-Reproducible

Additional Information

The issue is non-reproducible.

Workaround

Create a feature layer, apply the symbology, and add the layer. The sample script is stated as below:

import os

p = arcpy.mp.ArcGISProject('current')

m = p.listMaps()[0]

relpath = r"C:\Users\<Username>\Documents\ArcGIS\Packages\SymbologyLayout_806889\commondata\work"

#SymbolLayer

symbolLayer = os.path.join(relpath, "Boundary.lyrx")

#Add Layer 1 and update symbology

#lyr1add = m.addDataFromPath(os.path.join(relpath, "workone.shp"))

#arcpy.management.ApplySymbologyFromLayer(lyr1add, symbolLayer, None, "DEFAULT")

lyr1path = os.path.join(relpath, "workone.shp")

lyr1make = arcpy.management.MakeFeatureLayer(lyr1path, "WorkOne")

lyr1add = arcpy.management.ApplySymbologyFromLayer(lyr1make, symbolLayer, None, "DEFAULT")

m.addLayer(lyr1add.getOutput(0))

#Export

lyt = p.listLayouts('Layout')[0]

lyt.exportToPDF(r"C:\Temp\TestOutput.pdf")

os.startfile(r"C:\Temp\TestOutput.pdf")

Steps to Reproduce

Bug ID: BUG-000142773

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options