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.

An overview of customization is included in the ArcPad Studio help which can be launched from the Help menu inside ArcPad Studio, from the Windows Start menu or browsed from the ArcPad installation folder of \\ProgramFiles\ArcPad\Developer\Help\. The ArcPad customization help is also available online at

http://resources.arcgis.com/en/help/arcpad/10.2/sdk/concepts/

For all available customization resources including samples and links to all documentation, go to the ArcPad Community page at

http://resources.arcgis.com/en/communities/arcpad/index.html

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 in a tree formation 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 (ArcPad and ArcPad Studio) and Form (arcPad Studio) editors are examples of these.

ArcPad XML is documented in the ArcPad Studio help can be launched from the Help menu inside ArcPad Studio, from the Windows Start menu or browsed from the ArcPad installation folder of \\ProgramFiles\ArcPad\Developer\Help\. The ArcPad XML Reference is also available online at

http://resources.arcgis.com/en/help/arcpad/10.2/sdk/xml/index.html

Working with the ArcPad Object Model

ArcPad exposes an extensive object model that can be accessed via script. 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 script. Once ArcPad is closed, all of the objects cease to exist until ArcPad is started again.

Data Access Objects

You can launch the Object Model Diagram from the Help menu inside ArcPad Studio, from the Windows Start menu or browse to it in the ArcPad installation folder under \\ProgramFiles\ArcPad\Developer\Diagrams\.

Along with ArcPad XML, the ArcPad scripting reference is also documented in the ArcPad Studio help which can be launched from the Help menu inside ArcPad Studio, from the Windows Start menu or browsed from the ArcPad installation folder of \\ProgramFiles\ArcPad\Developer\Help\. The ArcPad scripting reference is also available online at

http://resources.arcgis.com/en/help/arcpad/10.2/sdk/scripting/index.html

9/23/2019