Summary
This tool creates a mobile cache with a map schema and GIS data for Mobile Project Center (MPC), a component of the ArcGIS for Windows Mobile product, to build a mobile project. Using the map document's current full extent, this tool generates a mobile cache from an input map document. The output is a folder using the map document name as its folder name, a mobile cache containing a map schema, the GIS data, and associated attachments folder (if available).
Usage
The tool is available for use only with the Microsoft Windows operating system.
By default, this tool generates a mobile cache for all layers within a map document, but only vector layers with global ID based on ArcSDE or file geodatabase data sources can be synchronized between ArcGIS for Windows Mobile field applications and the data source.
The output folder must exist prior to tool execution.
By default, the tool creates a mobile cache folder including a map schema, the GIS data, and attachments (if available).
By default, the extracted extent is based on the map document's full map extent.
By default, all layers are extracted into the mobile cache.
Syntax
CreateMobileCache_mobile (input_mapDocument, input_outputFolder, {input_layers}, {input_attachments}, {input_version})
Parameter | Explanation | Data Type |
input_mapDocument | The map document to create a mobile cache | ArcMap Document |
input_outputFolder | The directory of the output folder | Folder |
input_layers [input_layers,...] (Optional) | The names of the layers to extract | String |
input_attachments (Optional) | Determines if the attachments associated with feature classes will be extracted.
| Boolean |
input_version (Optional) | The geodatabase version from which the cache will be generated | String |
Code Sample
Create Mobile Cache example 1 (Python window)
Create a mobile cache from a map document with all data and attachments.
import arcpy
arcpy.CreateMobileCache_mobile("C:/CampusMap/Campus.mxd","C:/CampusMap/MobileMap","#","#","#")
Create Mobile Cache example 2 (stand-alone Python script)
Generate a mobile cache with attachments from the selected layers contained within a map document.
import arceditor
import arcpy
Campus_mxd = "C:\\CampusMap\\Campus.mxd"
MobileMap = "C:\\CampusMap\\MobileMap"
arcpy.CreateMobileCache_mobile(Campus_mxd, MobileMap, "PointAttachmentAtCache;LineAttachmentAtCache;PolygonAttachmentAtCache;PointWithoutAttachmentAtCache;LineWithoutAttachmentAtCache;PolygonWithoutAttachmentAtCache;PointWithoutGlobalIDAtCache", "INCLUDE_ATTACHMENTS", "")
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