Scripts, ArcPad XML, and the ArcPad Object Model

Depending on the type of customization you are doing in ArcPad Studio, you may need to become more familiar with scripts, ArcPad XML, and/or the ArcPad Object Model.

Working with scripts

Although a great deal of customization can be accomplished without writing a single line of code, the fundamental feature of ArcPad’s customization environment is the ability to use scripts. ArcPad exposes an extensive object model that can be accessed via active scripting languages. These objects are available to your scripts whenever the ArcPad application is running.

ArcPad operates as an active scripting host for VBScript, JScript, and Python. Both VBScript and JScript are typically available on Windows and Windows Mobile by default. In order to use Python as a scripting language in ArcPad, both the Python programming language (typically installed with ArcGIS 10) and the PyWin32 Python Extensions for Windows are required. Users must install both on their Windows computer before Python will be recognized by ArcPad. With the Python programming language and PyWin32 Python Extensions for Windows installed, users can:

For more information on the Python programming language, see http://www.python.org/. For more information on PyWin32 Python Extensions for Windows, see http://sourceforge.net/projects/pywin32/.

Working with ArcPad XML

Whether you use scripts or not, all of ArcPad’s customization files are stored in ArcPad XML format. Familiarization with this format will allow you to work with any of the ArcPad customization files in any text or XML editor. The ArcPad XML format is designed as a protocol for automation and customization of ArcPad. It is based on the XML 1.0 specification and uses the same syntax as ArcXML wherever possible (especially for symbology). ArcPad XML files can be ANSI, UTF-8, Unicode, or Unicode Big Endian encoded.

ArcPad XML files (.apa, .apx, and .apl) are displayed as a tree diagram which is directly related to the underlying XML structure of the files. ArcPad XML elements and attributes are displayed as branches in the tree. You can edit the files very quickly by double-clicking elements and attributes. There are also various editors to speed up development and editing of ArcPad XML files by providing a graphical environment. The Toolbar and Form editors are examples of these.

ArcPad XML is documented in the ArcPad Studio help whose default installation path is C:\Program Files\ArcGIS\ArcPad10.0\Developer\Help\ArcPadStudio.chm.

Working with the ArcPad Object Model

ArcPad exposes an extensive object model that can be accessed via VBScript or JScript. The ArcPad object model includes approximately 50 objects that are exposed while ArcPad is running. As long as ArcPad is running, you can access and manipulate these objects via VBScript or JScript. Once ArcPad is closed, all of the objects cease to exist until ArcPad is started again.

Data Access Objects

The default installation path for the Object Model Diagram is C:\Program Files\ArcGIS\ArcPad10.0\Developer\Diagrams\ArcPadObjectModel.pdf.

The ArcPad Object Model is also documented in the ArcPad Studio help whose default installation path is C:\Program Files\ArcGIS\ArcPad10.0\Developer\Help\ArcPadStudio.chm.


2/6/2013