Synchronize Mobile Cache (Mobile)
This tool synchronizes an updated mobile cache and its associated attachments (if available) with its data source using its originating map document.
This tool is available for use only with Microsoft Windows operating systems.
This tool synchronizes a mobile cache and its associated attachments (if available) with its data source via a map document; this map document is the one that the mobile cache is extracted from. When the tool synchronizes changes between a mobile cache and the map document, it determines whether or not the map document has the same schema as the mobile cache schema by comparing their checksums. The checksum is calculated based on the schema of the selected map layers' data source. If the schema has been changed, you will not be able to synchronize changes.
By default, the extent to upload or download changes is based on the map document's full extent.
Only vector layers based on an ArcSDE or file geodatabase can be synchronized between the mobile cache and its data source. By default, all layers will be examined, and all edits will be checked in.
If the data source is a versioned geodatabase, this tool first uploads edits from the mobile cache to its data source, removes the mobile cache, then re-creates the mobile cache for the specified version.
Parameters have changed for this tool at version 10.1. Scripts and models based on 10.0 Mobile Tools will need to be modified to work in 10.1.
The Map Document to synchronize with the mobile cache.
The directory where the mobile cache and attachments (if available) located.
Specifies whether to upload changes from a mobile cache to the map document:
Specifies whether to download data from the map document to a mobile cache:
The names of the layers to synchronize.
The version of the geodatabase for data download.
The following Python window script demonstrates how to use the SynchronizeMobileCache tool in immediate mode. It synchronizes all layers in a mobile cache with its map document. The attachments associated with feature classes will be also synchronized.
The following stand-alone script demonstrates how to use the SynchonizeMobileCache tool to synchronize selected layers in a mobile cache to its map document, including attachments.
import arceditor import arcpy Campus_mxd = "C:\\CampusMap\\Campus.mxd" Campus = "C:\\CampusMap\\MobileMap\\Campus" arcpy.SynchronizeMobileCache_mobile(Campus_mxd,Campus,"UPLOAD_CHANGES","DOWNLOAD_CHANGES","PointAttachmentAtCache;LineAttachmentAtCache;PolygonAttachmentAtCache;PointWithoutAttachmentAtCache;LineWithoutAttachmentAtCache;PolygonWithoutAttachmentAtCache","")