Using findAndReplaceWorkspacePaths to change datasource for ArcSDE geodatabase?

المشرف العام

Administrator
طاقم الإدارة
I manage to change my datasouce by right clicking on an mxd file and choosing a different sde database connection file as shown in the following image.


However When I try to do this using arcpy script the datasource it is not changed, but the new mxd is created (having the old datasource)

import arcpymxd = arcpy.mapping.MapDocument(r"C:\Users\SMALIS\Documents\ArcGIS\pythonSwitchSource.mxd")mxd.findAndReplaceWorkspacePaths(r"Database Connections\sdeConnection1.sde",r"Database Connections\sdeConnection2.sde")mxd.saveACopy(r"C:\Users\SMALIS\Documents\ArcGIS\pythonSwitchSourceNEW.mxd")del mxdCan somebody explain me why is that happening?

I use ArcGIS 10.2 for Desktop.Oracle 11g



أكثر...
 
أعلى