Feature Services & arcpy.ConsolidateMap_management & .replaceDataSource

المشرف العام

Administrator
طاقم الإدارة
We have several in house published feature services, including some from our Esri Data Stores. When I use arcpy.ConsolidateMap_management on an mxd (10.1) the Feature Services are nicely consolidated into local file geodatabase, but the layers are not re-sourced.

When I use ArcCatalog to manually "set data source/s" in the mxd to the local file geodatabase, the paths are not present in the output mxd and no errors are produced.

Not stopping there. I then wrote some ArcPY to re-source the offending layers.The ArcPy works perfectly but the sources remain the same...

if ISFS == 1: # Only proceed if it's an HTTP / Feature Service arcpy.AddMessage(" ") arcpy.AddMessage(" - FEATURE SERVICE TEST ---------------------" ) arcpy.AddMessage(" - Layer Name: " + str(FSLyr)) try: dataset_name = ("a"+str(FSFCNAME)) arcpy.AddMessage(" - FS Data Source: " + str(LayerSource)) arcpy.AddMessage(" - Consolidated fGDB: " + str(ConsolidatedFeatureServiceWorkspace)) arcpy.AddMessage(" - Feature Class Name:" + dataset_name) FSLyr.replaceDataSource(ConsolidatedFeatureServiceWorkspace, "FILEGDB_WORKSPACE", dataset_name, False) arcpy.AddMessage(" - Replaced ") arcpy.AddMessage(" ") FeatureServiceMxd.save()Results:


Before I investigate loading the file geodatabase feature class into the mxd and stealing the old cartography, does anyone know why we are denied changing Feature Service Layer sources?



أكثر...
 
أعلى