I'm trying to use ArcPy in ArcMap, so Python 2.7, to automate the basics for the maps I make on a daily basis. Rather than having myself setout certain elements I want Python via the ArcMap API to do it for me.
So far I have the maps created, datasource, extent sorted, captions updated etc. Now I turn to the grid and scale bar.
In my script the layout view is set to the extent of a feature class (plus a buffer either side), this means the scale bar and graticule grid changes based on the extent.
How do I get access to the properties in the scalebar/grid?
When it comes to captions I use the following and update the placeholder text:
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if elm.text == current_text: elm.text = text
I've seen in 2010 posts that ArcPy is not yet ready for altering scale bar and grid properties, has the situation changed?
Using this I can get to the width parameter but I want to set the
for elm in arcpy.mapping.ListLayoutElements(mxd, "MAPSURROUND_ELEMENT"): elm.elementWidth=11