Synchronize Mobile Cache (Mobile)

License Level:BasicStandardAdvanced

Summary

This tool synchronizes an updated mobile cache and its associated attachments (if available) with its data source using its originating map document.

Usage

Syntax

SynchronizeMobileCache_mobile (input_mapDocument, input_inputFolder, {input_uploadChanges}, {input_downloadChanges}, {input_layers}, {input_version})
ParameterExplanationData Type
input_mapDocument

The Map Document to synchronize with the mobile cache.

ArcMap Document
input_inputFolder

The directory where the mobile cache and attachments (if available) located.

Folder
input_uploadChanges
(Optional)

Specifies whether to upload changes from a mobile cache to the map document:

  • UPLOAD_CHANGESChanges from the specified mobile cache will be uploaded to the map document. This is the default.
  • NO_UPLOAD_CHANGESChanges from the specified mobile cache will not be uploaded to the map document.
Boolean
input_downloadChanges
(Optional)

Specifies whether to download data from the map document to a mobile cache:

  • DOWNLOAD_CHANGESWill download changes from data source to the specified mobile cache. This is the default.
  • NO_DOWNLOAD_CHANGESWill not download changes from data source to the specified mobile cache
Boolean
input_layers
(Optional)

The names of the layers to synchronize.

String
input_version
(Optional)

The version of the geodatabase for data download.

String

Code Sample

Synchronize Mobile Cache Example 1 (Python Window)

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.

arcpy.SynchronizeMobileCache_mobile("C:/CampusMap/Campus.mxd","C:/CampusMap/MobileMap/Campus","UPLOAD_CHANGES","DOWNLOAD_CHANGES","#","#")
Synchronize Mobile Cache Example 2 (Stand-alone Python Script)

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","")

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
12/4/2012