Legend not updating between ExportToPDF() calls

670
2
04-13-2010 11:26 AM
DerekSwingley
Occasional Contributor
I'm exporting some maps and turning layers off and on between exports. I'm expecting the legend to update in my exported .pdfs but it's not. I've logged this with support but figured I'd start a thread here too. Here's a piece of my script:
for lyr in lyrs:
 if lyr.name in layer_list:
  print 'Exporting', lyr.name
  lyr.visible = True
  df.extent = lyr.getExtent()
  export_path = pdf_base + lyr.name + '.pdf'
  arc.ExportToPDF(mxd, export_path)
  lyr.visible = False


Is there some way to force the legend to update? I was thinking changing the layer's visibility should trigger a legend update. Anyone else seen this?
0 Kudos
2 Replies
DerekSwingley
Occasional Contributor
Not many people around here I guess...

Support logged this as a bug for me:  #NIM056303  Map legend does not update based on layer visibility when exporting maps using arcpy.mapping.ExportToPDF()

Hopefully it will be fixed for final.
0 Kudos
JeffMoulds
Esri Contributor
Thanks for your input. The plan is to have NIM056303 fixed for final.
0 Kudos