ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Synchronize Mobile Cache

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

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

Usage

    Legacy:

    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.

  • 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.

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_CHANGES —Changes from the specified mobile cache will be uploaded to the map document. This is the default.
  • NO_UPLOAD_CHANGES —Changes 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_CHANGES —Will download changes from data source to the specified mobile cache. This is the default.
  • NO_DOWNLOAD_CHANGES —Will 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

Licensing Information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • An overview of the Mobile toolbox
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal