ArcGIS 10.2: ArcPy - how to replace workspace paths?

المشرف العام

Administrator
طاقم الإدارة
I am teaching myself ArcPy and I am attempting to make a code to replace paths to the items in my workspace. I had a file geodatabase and its path changed so I would like to automatically modify the path with ArcPy.

mxd=arcpy.mapping.MapDocument("CURRENT") arcpy.mapping.MapDocument.findAndReplaceWorkspacePaths(r"E:\GIS_Wolverine Time\ArcGIS\California_DrinkingWater\Cali2.mdb",r"E:\GIS\California_DrinkingWater\Cali2.mdb")

I thought it was that simple but I received the following error:

Runtime error Traceback (most recent call last): File "", line 1, in TypeError: unbound method findAndReplaceWorkspacePaths() must be called with MapDocument instance as first argument (got str instance instead)



أكثر...
 
أعلى