qwong

Create an elastic Layout Template containing Graticules for PDF export?

Discussion created by qwong on Nov 21, 2012
Is there a way to programmatically create an elastic (i.e. resizable) Layout Template with Graticules that I can use for PDF export?

It seems to me the only avenue available to me is a hack by doing the following:

  1) Create a Layout Template mxd file with Graticules in ArcMap
  2) Set result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, pathToTemplateMxd)
  3) Set mxd = result.mapDocument
  4) Set the value of mxd._arc_object.pageLayout.width
  5) Set the value of mxd.activeDataFrame.elementWidth
  6) Call arcpy.mapping.ExportToPDF(mxd, Output_File)

This does seem to work but Step 3 seems particularly dodgy, since I'm referencing the (presumably) intended-to-be-private "_arc_object" property.

Does anyone know a better way of doing this?

Outcomes