AnsweredAssumed Answered

How to replace a "Picture_Element" in multiple Mxd's?

Question asked by ArqEric on Jun 22, 2015
Latest reply on Jun 23, 2015 by xander_bakker

HI, I am trying to loop this script in 35 mxd's, in different folders, but I don't know how. Can someone help me?

Eric

 

import arcpy

mxd = arcpy.mapping.MapDocument(r"D:\Test\D1.mxd")

 

 

locfinal = arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT","Localización2")

for object in locfinal:

    object.sourceImage = r"D:\Test\Picture\test_picture.jpg"

    object.name = "loc mun estatal"

    object.elementHeight = 9.4827

    object.elementWidth = 11.99

    object.elementPositionX = 77.0

    object.elementPositionY = 94.0

mxd.saveACopy(r"D:\Test\D1copy.mxd")

Outcomes