I want to use arcpy.mapping to make some changes to a mxd. I am using the Spyder environment for python. To change the title I can use the following code:
import arcpy myMap = r'C:\path_to_mxd\myfile.mxd' mxd = arcpy.mapping.MapDocument(myMap) mxd.relativePaths = True mxd.title = 'Title' arcpy.RefreshActiveView() mxd.save()
I can't execute
mxd.save() on an open mxd file though. Is there a way to make changes to an open file and view any code I execute on the fly?