New answers tagged

0

In your code sample, you're trying to save the mxd object, not a path to the object. i.e., mxd.saveACopy(mxd). This is not the correct way to perform this action. The documentation advises using the entire file path, like the following: import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd") for df in arcpy.mapping.ListDataFrames(mxd): ...


3

You can name your Text Elements (double-click on your title element, click the Size and Position tab, and in Element Name field, type in a unique name). Then in your script, you can reference that unique name in order to modify the specific title text element. for titleItem in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if titleItem.name ==...



Top 50 recent answers are included