Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Trying to change elementWidth

$
0
0
Hi

I'm using the following code:

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Courtney\TEST.mxd")
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
if elm.name == "author":
elm.text = '<dyn type="document" property="author"/>'
elmWidth = 2.5
elm.elementPositionX = 3.23
elm.elementPositionY = 8.54
print elmWidth

prints 2.5

The script runs fine but when I open the mxd the xy position is changed but not the elmWidth, is there another way to change
element width bc I've tried it a bunch of times and nothing works.

Also is there a better script to add title, author, dataframe time to the layout without having to set each xy position and element width?

Thank you

Viewing all articles
Browse latest Browse all 2485

Trending Articles