5

I have been developing a script to automate my ArcPad checkin/checkout processes. My problem is that I am having trouble getting arcpy to recognize the ArcPad tools from the command line. From the example below you can see the specific error I'm getting. There is however some recognition that the tools exist as the help window actively shows the tool and parameters, giving help suggestions while you type as it would for any other tool. I have also followed the recommendations from this post:

Python scripting for ArcPad Checkin

I have about 100 checkin/checkouts to perform which is why I'd rather automate the process.

Example:

>>> arcpy.ArcPadCheckout_ArcPad("points_2015","","","","checkout_points.axf")
Runtime error 
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "C:\Program Files (x86)\ArcGIS\ArcPad10.0\DesktopTools10\ArcPad Tools.tbx", line 66, in ArcPadCheckout
AttributeError: Object: Tool or environment <ArcPadCheckout_ArcPad> not found
>>>

Attempt from example given below, similar error message:

>>> import arcpy
>>> from arcpy import env
>>> env.workspace="H:/path_to_my_geodatabase.gdb/"
>>> arcpy.AddToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\ArcPad Tools.tbx")
<module 'ArcPad' (built-in)>
>>> arcpy.ArcPadCheckout_ArcPad("points_2015","","","","checkout_points.axf")
Runtime error 
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "c:\program files (x86)\arcgis\desktop10.1\ArcToolbox\Toolboxes\ArcPad Tools.tbx", line 66, in ArcPadCheckout
AttributeError: Object: Tool or environment <ArcPadCheckout_ArcPad> not found
>>>
3
  • 1
    Which version of desktop and arcpad are you using? There was a known issue between some desktop and arcpad versions with Python but if you use the latest versions it should be ok. Commented Feb 19, 2015 at 10:48
  • ArcMap 10.1 and ArcPad 10 Commented Feb 19, 2015 at 15:21
  • You can make checkin/checkout using Arcmap 10.1 ? are you activating ArcPad Data Manager extension? Commented Feb 27, 2015 at 22:51

2 Answers 2

2
+25

ArcPad Checkout from python command line works in arcgis 10.1, but you need to add arcpad toolbox with arcpy.AddToolbox().

this is a working sample script, in this script i pass the path of the axf as first argument in commande line:

import arcpy , sys 
arcpy.env.overwriteOutput = True
arcpy.AddToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\ArcPad Tools.tbx") ##adding arcad toolbox 
path_axf = sys.argv[2] 
arcpy.ArcPadCheckin_ArcPad(path_axf, "", "")
answered Feb 26, 2015 at 9:09
1

There is a bug for this - NIM102547 - ArcPad tools fail to work in Python outside of ArcMap. It's been found in 10.2.1 but there's no reason why the behaviour should be different in previous versions.

As an alternative, you can run your script as a script tool or from the Python window.

Also, as @om_henners says, it's not a good idea to use combinations of different versions of ArcPad/ArcGIS for Desktop. I've experienced many issues doing this - in 10.0 at least, even combinations of different service packs would cause problems, maybe the 10.2 ArcPad tools are more stable.

answered Feb 26, 2015 at 8:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.