1

I need to implement, within this very simple piece of code, the option that replicate the "Clip to output graphics extent" available from the ArcGIS 10.0 Export Map UI standard command. Is it possible? The purpose is to iterate a list of MXDs and export them their layout view to a graphic format.

mxd = arcpy.mapping.MapDocument(r"E:\XXX\\" + m)

arcpy.mapping.ExportToPNG(mxd, outDir + '\\' + str(m))

Please note I need to export the Layout View and NOT the Data View.

I have further investigated and I think the solution probably lays along the following lines:

  1. extract from the DATAFRAME_ELEMENT its width and height
  2. change the page printer size according to the values above using suggestions from geonet.esri.com/thread/59446
  3. center the dataframe to the page margin
  4. export the layout to a graphic file.

I will try the approach above and publish any results.

closed as off-topic by PolyGeo Jul 5 '16 at 20:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.