ArcPad file types
When customizing ArcPad, you'll work with several different types of files. Each file type plays a specific role in ArcPad and is differentiated by a unique file extension. The key file types are described here.
ArcPad XML files
The ArcPad XML format (*.apx) is a protocol for automation and customization of ArcPad. It is based on the Extensible Markup Language (XML) 1.0 specification and borrows many of the symbology elements and attributes from ArcXML (AXL). Although all of ArcPad's customization files are stored as XML text files, the .apx extension is used only for the following files:
- Default Configuration file (ArcPad.apx)—The ArcPad.apx file is loaded by default each time ArcPad starts. This file can contain custom toolbars, forms, and system object event handlers. It can also contain other parameters that override ArcPad's default, such as which toolbars are initially visible when the application starts.
- Global Bookmark file (ArcPadBookMarks.apx)—This file contains spatial bookmarks that can be used in ArcPad regardless of the current map.
- ArcPad Preferences file (ArcPadPrefs.apx)—This file contains ArcPad's default parameters—such as display units, camera settings, global positioning system (GPS) settings, and default file paths—that are set via the ArcPad Options, GPS Preferences, Rangefinder Preferences, and Advanced Settings dialog boxes.
- Extensions Preferences file (ExtensionPrefs.apx)—This file contains a list of extensions recognized by ArcPad and their loading status. The first time you run ArcPad, ExtensionPrefs.apx does not exist, so every extension installed is loaded and examined. On subsequent restarts of ArcPad, ExtensionPrefs.apx is examined, and only required extensions are loaded, saving time and memory.
- ArcPadBookMarks.apx and ArcPadPrefs.apx are stored in the My Documents/My ArcPad folder on both desktop PCs and mobile devices.
- ArcPad.apx and ExtensionPrefs.apx are stored in the My Documents/My ArcPad and ArcPad System folders on desktop PCs. On mobile devices, they are stored in the My Documents/My ArcPad folder only.
- To restore the original settings in ArcPad, delete ArcPadPrefs.apx and ExtensionPrefs.apx, then restart ArcPad.
ArcPad applet files
ArcPad applet files (*.apa) provide a means of delivering a mini application in a single file without having to reconfigure ArcPad. Applets can contain toolbars, forms, and system object event handlers. ArcPad automatically loads applets after the default configuration has been loaded.
Place applet files in the system Applets path or in any user-defined applets paths specified on the Paths page of the ArcPad Options dialog box.
ArcPad layer definition files
Layer definitions for shapefiles are stored in a file associated with the shapefile, with the same file name as the shapefile but with the extension .apl. Layer definition files provide a means of developing customizations that are delivered and loaded with shapefile data. Most customizations delivered this way are data entry forms with associated scripts that handle data entry validation and other features offered on the forms. Layer definition files can also contain custom symbology exported from ArcGIS for Desktop or ArcView 3.x. Layer definitions for ArcPad AXF files are stored with the corresponding feature layers inside the AXF files.
ArcPad AXF files
An ArcPad AXF file (*.axf) is a Microsoft SQL Server Compact Edition relational database, stored as a single file. It contains multiple components, such as feature tables, feature layers (including layer definitions), data tables, and files (including VBScripts, JScripts, or Python scripts).
ArcPad map files
An ArcPad map file stores a list of the map layers of an ArcPad session. A map lists all the feature layers together with their display settings including the extent of your map, color, and projection environment.
- You can specify that a certain map be loaded by default whenever you start ArcPad. Simply name the map ArcPad.apm, and place it in the Default Maps & Data path, which is specified in ArcPad on the Paths page of the ArcPad Options dialog box.
Script files
Much of the customization in ArcPad is accomplished by writing scripts. Currently, ArcPad supports Microsoft JScript and VBScript, and Python script languages. Although scripts can be embedded within the various ArcPad customization files, it's often more efficient to place related scripts in a separate script file—*.js, *.vbs, or *.py.
- When customizing ArcPad AXF files, script files are stored in the AXF files, in the File Store. If you create your script in ArcPad Studio's Script Editor, this is accomplished automatically.
- If your scripts are placed in a script file, the script file must be referenced in your customization file. If you create your scripts in ArcPad Studio's Script Editor, this is accomplished automatically.
- For example, to manually reference the mylayer.js script in the mylayer.apl layer definition file, place the following code at the end of mylayer.apl (just before the </ArcPad> element): To reference a script in customization files other than layer definition files (for example, applet and default configuration files), place code similar to the above code just before the </ArcPad> element. The same method is used for .vbs and .py script files.
<SCRIPT src="mylayer.js" language="JScript"/>
- For example, to manually reference the mylayer.js script in the mylayer.apl layer definition file, place the following code at the end of mylayer.apl (just before the </ArcPad> element):