The ArcPad Team Blog

Unofficial stuff from the team behind the World's leading mobile GIS platform

Friday, August 22, 2008

Using a ToolBox Model to create a customised ArcPad Check Out (PART 2)

In one of my previous posts

I descibed how to use model builder to automate your check out in ArcPad 7.1. I also eluded to (at the end of the help document) the fact you can add a step to deploy your files to your mobile device.

To do this you will need to download Microsofts CECopy tool which is a part of the Windows Mobile Developer Power Toys:

To add this to your model, you will need to create a script file which invokes the application, and add this as a 'script' tool to your toolbox (mine's called CECopy, see below)

The content of the file CECopy.vbs that this refers to looks like this:

dim WshShell
Source_FileSpec = wscript.arguments.item(0)

Destination = wscript.arguments.item(1)

a = "C:\Program Files\ArcPad 7.1\Desktop Tools\Samples\AXFCopy\CECopy.exe"
b = Source_FileSpec
c = Destination
d = chr(34) & a & chr(34) & chr(32) & chr(34) & b & chr(34) & chr(32) & c

Set WshShell = WScript.CreateObject("WScript.Shell")WshShell.Run(d)

Before the script tool can be used in toolbox, parameters need to be defined in the tool (in addition to being defined in the script) - this will allow you to interactively chose the input files, either in an edit box (if you run it standalone) or as the output from another tool. Right mouse click on the script in ArcCatalog and choose 'properties'. you will need to define two input parameters and ensure that their data type matches what you are actually moving (ie: if you use this in a model and your output from a previous step is a file - then the data type for source_filespec must be 'file').

You should now be able to create a model that looks something like this:

Which will perform a 'fresh' check out of the Riverside sample data (gdb), copy the layer definitions from the sample Riverside AXF (ie: custom forms), and copy the resultant AXF to a connected windows mobile device.

NB: Two new toolbox tools have been designed for ArcPad 7.2 which will eliminate the need for the scripting shown here. 'ArcPad Saved Check Out' will allow to repeat a check out previously configured in ArcMap, and 'Arcpad Deployment' will allow you to deploy data to your device. To try these new tools, sign up for the ArcPad 7.2 beta program.


  • At Wednesday, September 03, 2008 11:52:00 am, Anonymous Anonymous said…

    Can you post an example of the Destination string for this model or better yet a copy of a working model as I can’t get past the third process, it just keeps on executing. Thankyou

  • At Friday, October 31, 2008 7:35:00 am, Blogger rafa. said…

    One reason we still do this process manually is because we need to Copy Out background layers that we don't want edited. It would be great to see this option in the model as well. For that matter, controls on extents and definition queries, too.

  • At Friday, October 31, 2008 10:19:00 am, Blogger Marika said…

    the new tools in the next release of ArcPad will allow you to define layers for copy out define extent and queries.


Post a Comment

<< Home