Using Python to Change Layout Templates

02-12-2013 03:04 PM
Status: Under Consideration
Labels (1)
New Contributor II
It would be beneficial to be able to use the arcpy.mapping module to change the layout template in the layout view by pointing to the path of the template.

For example, currently on the layout toolbar there is a button called Change Layout. When you click it a window will pop up allowing you to change your layout template to something else (ex. Architectural Page Sizes > ARCH A Portrait.mxd).

It would be nice if users were able to incorporate the selection of this template in python scripting for map making purposes.
I agree with kvanasse. Changing the layout (while using "CURRENT" as mapdocument) is an important improvement!

Have there been any thoughts from ESRI on this?

This would be a valuable addition to arcpy, as I could create some great automation scripts for my users who must often replicate the same map in multiple sizes.

Status changed to: Under Consideration

Thank you for your feedback.  There is a long answer to this. 

First, the Layout team is developing commands for 3.1 that allow you to resize a layout AND have an option to scale layout elements proportionally.  The same resize boolean is available to copying a layout. 

Second, (NOT arcpy.mapping in ArcMap) is also being expanded.  At 3.1 we are adding content management functions to copy project items like maps, layouts, and reports.  This allows you to make a copy and then automate changes to the copy. already allow you to change the page size - the problem is that is does NOT automatically resize elements.  That option can't come until after the Layout commands are completed.  At 3.1 is also adding the ability to CREATE new maps but NOT layouts (yet).  That is because traditionally doesn't allow you to create new objects so why create a layout when you can't create things like map frames, scalebars, etc.  This is definitely something we want to get to longer term. 

Jeff - Layout and teams


With reference to layouts (" but NOT layouts (yet)"), do we have in arcpy now to create a new layout? 

Thank you in advance.


@saraswathiemani2 we are introducing the following at 3.2.  ArcGISProject functions can create elements on a layout OR a graphics layer in a map.