Select to view content in your preferred language

Customizing ArcPad for Arc10 as Add-in    No ArcPad Libraries?

1992
5
01-11-2012 02:01 PM
ForrestKaye
Regular Contributor
I have recently been trying to Migrate some VBA scripts developed in 9.3 that runs a Custom CheckOut procedure to an Add-in.  I am working in Visual Studio 2010.

Visual Studio does not recognize the ArcPad objects(and prompts to add library) as it does with other ESRI objects.  When I try to manually load the ArcPad libraries/references it tells me that it can't find them, even though I am suppling the path to the library.

Upon further research I have found that these objects may have been removed!?  http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/type_changes_between_9_...
This thread also references the last link and seems to have the same problem.  http://forums.arcgis.com/threads/452-Beta-10-Missing-IArcPadExtension?p=162595#post162595


A snippet of what I am trying to work with and convert:

        Dim pUID As New ESRI.ArcGIS.esriSystem.UID
        Dim pExtension As IExtension
        Dim ArcPadExchange As ArcPadExchange
        Dim pArcPadExchange As IArcPadExchange
        Dim pArcPadExchangeTrans As IArcPadExchangeTransaction2
        Dim pArcPadExport As IArcPadExport2

        pUID = New UID
        pUID.Value = "ArcPadToolsGen2.ArcPadExchange"
        pExtension = Application.FindExtensionByCLSID(pUID)
        ArcPadExchange = pExtension
        pArcPadExchange = ArcPadExchange
        pArcPadExchangeTrans = pArcPadExchange
        Dim pAPdefaults As IGetDataForArcPadUIDefaults3 'IGetDataForArcPadUIDefaults2
        pAPdefaults = pArcPadExchange
        pAPdefaults.CopyoutFeatureType = esriAPToolsCopyoutAXF



Have these objects been added back in or has ESRI Removed the ability to work with ArcPad objects.

OR am I missing something?
Tags (3)
0 Kudos
5 Replies
KenMcCartney
Emerging Contributor
I noticed this as well.  It seems really easy to do with python - arcpy, so you could always execute the python or a geoprocessing model.  I'm not sure how I'd go about adding user-input to the process in your vb.net add-in, though.
0 Kudos
nev
by
Regular Contributor
IArcPadExchange doesn't exist in 10.  They removed it (very annoying), you need to add a reference to the ArcPadToolbox.dll and use the geoprocessing tools to do the checkin/out (or as suggested call a python script).  What this also means is you have to install ArcPad on every Desktop that is going to be syncing field devices.

BE WARNED if you use the ProcessArcPadProject tool to do a checkout and apply your custom forms it doesn't work properly (it always leaves out the vbs script files) so need a work around for that.

Mick
0 Kudos
ForrestKaye
Regular Contributor
Thanks for the replies. They have definitely helped.  A few questions and thoughts...

So I am interested in the Python option.  Are you saying that it is possible to access the IArcPadExchange through python, or at least run a fully custom checkout through python?  I don't quite follow.

That is very annoying that they have removed the IArcPadExchange from Arc10.  I haven't really thought of using the ArcPad geoprocessing tools because they don't seem to offer the same flexability running a standard Check Out.  As you mentioned it doesn't put the script files in the .axf. 

For a while I was using a work around by designating the script file path in the .apl's as some known path "\My Arcpad\Scripts\Mylayer.js"  This works fine on a mobile device but this path doesn't exist on a desktop. So I then had two different configurations, One for Mobile device and one for a Desktop device.  The only difference between the two was the script path in the .apl.  I guess it would be easy enough to use a file path that exists on both windows mobile devices and desktop devices but either way the extra maintenance of a "disconnected" script file is painful. 

It seems like there should be a way to connect to an .axf file after is has been created and insert the script file into the "AXF_FILESTORE" table as binary.  This is the way that it normally handles it.  I am in the process of testing this.  I just recently figured out how to connect to an SQL database so connecting to an SQL Compact Database should do just as smooth, then convert the script file to binary and insert into the "AXF_FILESTORE" Table.
0 Kudos
HannahFerrier
Deactivated User
Just to clear up your earlier statement -

From the ArcPad 10.0.3 ReadMe (Issues Addressed from the Previous Release):

Embedded scripts are no longer missing from ArcPad projects created by running Process ArcPad Project geoprocessing tool more than once (CQ00312594)

Thanks,

Hannah Ferrier
0 Kudos
nev
by
Regular Contributor
Forrest,
No, its not possible to access IArcPADexchange through python, its not possible to access it through anything (Except arcGIS 8.x, 9.x).  The geop tools should provide all the flexibility you need
Good to hear that processarcpadproject bug has finally been fixed.
0 Kudos