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"
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.