Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen thisthis post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

added 57 characters in body
Source Link
Jason Bellino
  • 4.3k
  • 1
  • 27
  • 35

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image.

added 152 characters in body
Source Link
Jason Bellino
  • 4.3k
  • 1
  • 27
  • 35

Even more maddening is that I've added different text elements to both the data frame view and the layout view so that I can verify which is being exported. Even with the map.activeView = 'PAGE_LAYOUT', the exported image has the data frame view text element (see below). However, when I print the text of the element using print text_elm.text, it properly prints the layout view text.

Expected output: enter image description here

Actual output: exported .png

Text element printed:

Even more maddening is that I've added different text elements to both the data frame view and the layout view so that I can verify which is being exported. Even with the map.activeView = 'PAGE_LAYOUT', the exported image has the data frame view text element. However, when I print the text of the element using print text_elm.text, it properly prints the layout view text.

exported .png

Even more maddening is that I've added different text elements to both the data frame view and the layout view so that I can verify which is being exported. Even with the map.activeView = 'PAGE_LAYOUT', the exported image has the data frame view text element (see below). However, when I print the text of the element using print text_elm.text, it properly prints the layout view text.

Expected output: enter image description here

Actual output: exported .png

Text element printed:

added 384 characters in body
Source Link
Jason Bellino
  • 4.3k
  • 1
  • 27
  • 35
Loading
Source Link
Jason Bellino
  • 4.3k
  • 1
  • 27
  • 35
Loading