Exercise 3: Deploying customization files

Exercise 1: Creating a default configuration file for toolbars (tree inventory)Exercise 2: Creating custom forms and writing scripts for shapefiles

Delivering the customizations

Regardless of how you choose to customize ArcPad, it is important to understand that all customization development is done on a desktop PC and not on a Windows Mobile device. The customizations created in ArcPad Studio, in the form of applets, default configuration files, scripts, and so on, are deployed on a Windows Mobile device with ArcPad. Therefore, it is imperative that you test your customizations before sending them into the field with your personnel. Also, there is no special runtime version of ArcPad required to deploy your customizations. The files you created in ArcPad Studio work with a standard ArcPad license.

Now that you are finished creating your various customization files, you need to deliver them to your end users; that is, the city personnel who uses the custom ArcPad application to inventory city trees on Windows Mobile devices.

For ArcPad to recognize the customizations you created, the appropriate files must be placed in the correct folder. When ArcPad starts, it automatically loads the customizations. This exercise shows you how to package and deploy your customization files to deliver your custom ArcPad solution.

Organizing the customization files

Review the files involved in this tutorial and where they need to go. In Exercise 1, you created files for the custom user interface (UI) tools. See the following table:

File

Purpose

ArcPad.apx

Default configuration file.

ArcPad.vbs

Associated VBScript source code file.

tree.bmp

Image for the custom tool.

All of the preceding files need to be placed in the end user's My ArcPad folder, which is located at C:\Users\<user account name>\Documents\My ArcPad (on Windows 7) and My Documents\My ArcPad (on Windows Mobile).

In a later step, you will use the Compile tool so only the ArcPad.apx file will be needed as the ArcPad.vbs and the trees.bmp files are encoded into the configuration file.

In Exercise 2, you created files for your custom data entry form. See the following table:

File

Purpose

Trees.apl

Layer definition file.

Tree Ownership.dbf

Database file format (DBF) table you associated with a ComboBox control on the Tree Information page on the Edit form.

Tree Names.dbf

DBF table you associated with a ComboBox control on the Tree Information page on the Edit form.

IDP List.dbf

DBF table you associated with a ComboBox control on the Tree Information page on the Edit form.

All of the preceding files need to be placed in the same folder as the Trees shapefile (.shp, .shx, .dbf, and .prj) on the end user's device.

NoteNote:

Do not overwrite the sample trees files that get installed with ArcPad with the files you created in this tutorial.

You will want to also use the Tutorial data that comprise the Tree_Inventory.apm file. You will copy these files manually in a later step. The following table shows the support files:

File

Purpose

Streets.apl

Streets layer definition file.

Streets.dbf

DBF table associated with the Streets.shp file.

Streets.prj

Projection file.

Streets.shp

Streets.shp reference file.

Streets.shx

Streets.shx reference file.

Trees.prj

Trees Projections file in the Tutorial folder.

Trees.dbf

DBF table associated with the Trees.shp file.

digitalglobe_quickbird_redlands_20to1.aux

Aerial Photo spatial reference file.

digitalglobe_quickbird_redlands_20to1.jp2

Aerial Photo of study area.

FieldNotes.apg

Graphics layer of the Tree Inspection area.

California_Fan_Palm.JPG

Image for the tree.

Canary_Island_Date_Palm.JPG

Image for the tree.

Crape_Myrtle.JPG

Image for the tree.

default.jpg

Image for the tree.

Mexican_Fan_Palm.JPG

Image for the tree.

Plum.JPG

Image for the tree.

Queen_Palm.JPG

Image for the tree.

Silk-Floss_Tree.JPG

Image for the tree.

Southern_Magnolia.JPG

Image for the tree.

Tree_Inventory.apm

Tutorial Map file.

Copying data to the mobile device

There are two options for copying data to the mobile device. You can manually copy data using Active Sync (XP) or Windows Mobile Device Center (Vista and above) and Windows Explorer, or you can achieve the same results by automating the process using ArcPad Studio's Compile tool. The Compile tool brings together your customization files (applets, configurations, and layers) and encodes, packages, or downloads these files directly to the device. See the following:

  • Encode—ArcPad Studio can provide some security to your ArcPad customization files. It applies an algorithm to the files so they are no longer in English.
  • Package—ArcPad Studio takes all associated files that are used in an applet, configuration, or layer customization file, such as .bmp, .dbf, or .vbs files and combines them into a master file that can be easily deployed.
  • Download—ArcPad Studio downloads or places your files into the specified path. These can be downloaded to a location on your desktop PC and/or to a remote path, that is, a location on your Windows Mobile device. The device needs to be connected to locate the appropriate folder.

Some files get embedded into the configuration files such as an associated .vbs or .js source code file, and tool images (bitmaps); in this tutorial, the ArcPad.vbs and the tree image.

Deploying customization files using the Compile tool

Steps:
  1. Click the Tools menu and click Options to set compile preferences in ArcPad Studio. See the following screen shot:
    Screen shot showing the Tools menu and the Options selection.

    You will set the compile preferences for your default configuration file (.apx) so that ArcPad Studio compiles the associated files and downloads them to specified locations on your desktop PC and Windows Mobile device.

  2. After you select Options, the Preferences dialog box appears. Click the Compile tab.
  3. To set the Configurations Project Output folder, click the Browse (folder) button to select the location on your desktop PC.
  4. To set the Layers Project Output folder, click the Browse (folder) button to select the location on your desktop PC.
  5. Select the Download check boxes.
  6. In the Configurations and Layers fields type the remote path of the folder on your Windows mobile device to which you want to download the files.
  7. Click OK on the Preferences dialog box. See the following screen shot:
    Screen shot showing the Preferences dialog box.

    In this screen shot, the Project Output Folders are set for Configurations and Layers files. You have chosen to compile the configurations to the My ArcPad folder since you want to add a new default configuration to alter the startup with your toolbar. The My ArcPad file location on Windows 7 is C:\Users\<user account name>\Documents\My ArcPad. If you are using Windows XP, the file location is C:\Documents and Settings\<user accout name>\My Documents\My ArcPad. The file location on Windows Mobile, shown here in the Remote Path field, is My Documents\My ArcPad.

    You have chosen to compile the layers to the City Trees folder, which was created on the PC (C:\DEV\CityTrees) and mobile device (\My Documents\CityTrees). You have to create the folders before you start downloading data to those locations. Notice the paths for the configurations and layers that you chose to download (their respective check boxes are selected. You can put your data in a folder of your choice, as long as all of the required files are present for the application to function properly.

  8. You will now compile both of the customization files. With your default configuration file (ArcPad.apx) open, click the Compile Compile button button on the toolbar. ArcPad creates a log file that outlines the results of the Compile tool, including files that were encoded, packaged, and downloaded (in this case, downloaded since you only chose that option).
  9. You now need to compile the Trees.apl file. With your layer definition file (Trees.apl) open, click the Compile button on the toolbar. ArcPad creates a log file that outlines the results of the Compile tool including the files that were encoded, packaged, and downloaded (in this case, downloaded since you only chose that option). Click the Windows menu and select Tile to view all of the files. You will notice in the ArcPad log file that the ArcPad.vbs and Trees.bmp files are embedded into the default configuration file (ArcPad.apx). See the following screen shot:
    Screen shot showing the compile log.

    You are now ready to deploy your field personnel. They have the right files, located in the right place to complete the city trees field inventory.

    NoteNote:

    You will need to copy the map (Tree_Inventory.apm) and other necessary data to the device since that data was not compiled in ArcPad Studio. Only the customization files, default configuration file (.apx), and the layer definition file (.apl) for the Trees layer were compiled. In this tutorial, you have an aerial photograph, photographs of trees, and a Streets layer that are part of the map, Tree_Inventory.apm. This data needs to be deployed using ActivSync as described in the next step. Alternatively, to use the Compile tool, you can place the required files in the correct locations. The next section shows how this is done.

Deploying customization files using Active Sync or Windows Mobile Device Center

If the target device is a Windows Mobile device, ensure that it is connected to your desktop PC and that you are connected with Microsoft Active Sync (Windows XP) or Windows Mobile Device Center (Vista and above). ArcPad should also be installed on your Windows Mobile device. For more information about installing ArcPad on a Windows Mobile device, see the ArcPad Installation Guide (on your PC local drive where ArcPad is installed, for example, \\Program Files\ArcGIS\ArcPad10.0\Help).

Steps:
  1. Click the Explore button on the Active Sync window. See the following screen shot:
    Screen shot showing the Explore button in the Active Sync window.
  2. Double-click My Windows Mobile-Based Device.
  3. Navigate to the My Documents\My ArcPad folder.
  4. Copy and paste the ArcPad.apx, ArcPad.vbs, and tree.bmp files from your desktop PC into the My ArcPad folder you navigated to in Step 3.
  5. Click OK on the Active Sync warning.

    No files will be converted since ArcPad supports the same files on the desktop as it does on the mobile device.

    The following applies if the target device is a desktop PC:

    • Some handheld devices support other Windows operating systems such as Windows XP or Windows 7. You can also use ArcPad in the field on your standard laptop or Tablet PC. The procedure is similar to that described above. Copy the ArcPad.apx, ArcPad .vbs, and tree.bmp files to the My ArcPad folder under your user account. Normally, the location is C:\Users\<user account name>\Document\My ArcPad, and (the user account) should be substituted by your real account name, for example, tester.
    • Additionally, copy and paste the trees.apl, Tree Names.dbf, Tree Ownership.dbf, and IDP List.dbf files into the same folder as the trees shapefile (.shp, .shx, .dbf, and .prj). The default location is \\Program Files\ArcGIS\ArcPad\Developer\Samples\Tutorial.

Testing the tree inventory project

Once you have completed and placed the customization files in the appropriate folders, on your desktop PC or on your Windows Mobile device, it is time to ensure that everything is working properly. Testing is one of the most important steps in the entire process of creating a mobile geographic information system (GIS) project. You want to ensure that your field personnel have a positive experience with the application you created for them. Also, you want to ensure the accuracy of the collected data.

Steps:
  1. Start ArcPad. ArcPad starts with your custom toolbar displayed. None of the default ArcPad toolbars are visible.
  2. Click the Open Map folder button on the toolbar, browse to \\Program Files\ArcGIS\ArcPad\Developer\Samples\Tutorial, then open the Tree_Inventory.apm file.
  3. Click the Zoom In button.
  4. Click the screen and drag a box around the Tree Inspection Area to zoom into the area until the labels for the visible trees appear. See the following screen shots:
    Screen shot showing the Tree_Inventory.apm file.
    Screen shot showing the zoomed in Tree_Inventory.apm file.
  5. Use the custom Add Tree tool item to add a new tree record. Compare your form and make changes to the Trees.apl file in ArcPad Studio if necessary. For example, your controls may be misplaced. Open the Trees.apl and the Edit form to make the changes. Save the .apl file and depending on your compile preferences, copy the file to the device and re-test the application.
  6. Complete the City Trees form, add incorrect values for the DBH (for example, 55) and the tree height (for example, 120) to see if the data validation rules you created are working.
  7. Click OK after you have completed the testing of your application. Use the exit command to close the application. See the following screen shot:
    Screen shot showing the City Trees Edit form.

What's next

The Redlands sample data and applet, included with ArcPad, takes the concepts presented in this tutorial and builds on them further. The Trees layer definition file in the ArcPad sample data adds additional controls and scripts to the Edit form. Symbology has also been created for the shapefile, using the ArcPad Tools for ArcGIS Desktop. In addition, there is an Identify form that is used to view, but not edit, attributes in the shapefile, and a General form that is used to create work orders for city tree maintenance. The Redlands applet sample contains a custom toolbar that includes the custom tool you created in Exercise 1 in addition to some other custom and built-in tools.

TipTip:
  • At the completion of this tutorial, rename the ArcPad.apx file or remove it from My Documents\My ArcPad. If you don't, when you run ArcPad, this tutorial's customization files will be used as your default configuration.
  • Starting from ArcPad 8.0, tools are displayed under toolbar selectors. Since in this tutorial your custom toolbar displays all the tools in one line and no default toolars are shown in this project, you can hide the toolbar selector using the Quick Access menu located at the upper right corner in ArcPad.

2/7/2013