mxd = ur'G:\MapImageCreator\ImageTaker.mxd' print os.getcwd() # C:\Documents and Settings\dabkowsk\Desktop (where I run the script from) mxd = arcpy.mapping.MapDocument(mxd) print os.getcwd() # G:\MapImageCreator
You cannot type relative paths (using the dot and double-dot notation) in any ArcGIS application. Nor can you use relative paths in Python scripts.
arcpy.env.workspace = r"C:\temp"
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.