As of ArcGIS Desktop 10.0 the registration and discovery of the ArcPad tools has changed requiring a workaround. Both ArcGIS Desktop 10.0 SP3 and the ArcPad 10.0 installer implements this workaround.
If you have an older version of ArcGIS Desktop 10.0 you will be lacking the workaround.
If you have ArcGIS Desktop 10.1 you will also be lacking the workaround because the registration and discovery of tools have changed but such change will not work for the ArcPad 10.0 tools.
You need to perform the workaround manually:
- Open File Explorer
- Navigate to Desktop installation (e.g. C:\Program Files\ArcGIS\Desktop10.0)
- Navigate to the arcpy\arcpy subfolders
- Locate
__init__.py
- Edit it in a text editor
- Ensure the following
# Conditional import of arcpad tools
script is present (see python code snippet below):
- Navigate to your Python installation folder (i.e. C:\Python27)
- Locate your site-packages folder (i.e. C:\Python27\ArcGIS10.1\Lib\site-packages)
- Ensure arcpad.py exists, if not copy it from your ArcPad installation folder (i.e. C:\Program Files\ArcGIS\ArcPad10.0\DesktopTools10\arcpad.py)
- Restart ArcGIS Desktop and
voila
the ArcPad tools should be accessible in python
Here's the code snippet required for the conditional installation of ArcPad and it should be included in __init__.py
(place it after the conditional import of mobile tools and production tools):
# Conditional import of arcpad tools
try:
from . import toolbox
import arcpad
toolbox.arcpad = arcpad
if not hasattr(arcpad, '__all__'):
arcpad.__all__ = []
if not hasattr(toolbox, '__all__'):
toolbox.__all__ = []
for toolname in getattr(arcpad, '__all__', []):
toolbox.__all__.append("%s_%s" % (toolname, arcpad.__alias__))
setattr(toolbox, "%s_%s" % (toolname, arcpad.__alias__), getattr(arcpad, toolname))
from toolbox import *
del toolname
except ImportError:
pass