2

Is there a way to change the layout with arcpy?

Here are images of the steps I want to do programmatically.

Step 1

Step 2

The file I want to choose already exists and I want to hardcode its path in the script. I run ArcGIS 10.2

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Felix
  • 21
  • 1
  • Hey Felix - my gut reaction says this functionality is not currently available using arcpy.mapping etc. Generally, the package is great at manipulating elements and properties in existing maps, but it is lacking (at this time) when it comes to creating map documents from scratch or changing their template. You might be able to develop a workaround by using the elementPositionX, elementPositionY, elementHeight, elementWidth properties on the each DataFrame object in the map, but this seems complicated. Best Luck here. – Jim Sep 09 '15 at 14:58
  • Here's an idea requesting the same. – scw Sep 09 '15 at 17:39
  • This cant really be accomplished with arcpy. There are a few options though. If you want to stick with python you can use the os.startfile() and supply the path to your mxd but this will start a new instance of ArcMap. If you are open to arcobjects this can be easily accomplished by creating a button with an onClick that opens the layout. – landocalrissian Sep 09 '15 at 19:02
  • No possible yet. You will end up using ArcObjects and Comtypes! – Farid Cheraghi Sep 09 '15 at 19:52
  • Or ArcGIS Pro - see the duplicate. – PolyGeo May 18 '17 at 05:21

0 Answers0