I would like to automate the Mobile map creation in ArcGIS 10 from ArcObjects or Python, but can not get any of them to work. As far as I can see there is't a GPTool available for Mobile Tools in ArcObjects or am I wrong?
When I did not find it possible to use ArcObjects for this I started to look at Python. I am new to Python so maybe I am doing some misstakes here. From the Python window in ArcMap I got this simple script to work after I disabled the Background Processing option i Geoprocessing options:
##################
import arcpy
arcpy.CreateMobileMap_mobile("c:/Temp/MyMxd.mxd", "c:/Temp", "","","","")
##################
But I cant get a similar code to work in a stand alone Python script:
##################
import arceditor
import arcpy
from arcpy import env
arcpy.SetProduct("ArcEditor")
arcpy.env.scratchWorkspace = r"C:\Documents and Settings\WMUser\My Documents\ArcGIS\Default.gdb"
arcpy.env.workspace = r"C:\Documents and Settings\WMUser\My Documents\ArcGIS\Default.gdb"
map_document = r"c:\Temp\MyMxd.mxd"
output_folder = r"c:\Temp"
arcpy.CreateMobileMap_mobile(map_document, output_folder,"#", "#", "#", "#")
##################
The script does not generate any errors and I can not se any errors in the C:\Documents and Settings\WMUser\Application Data\ESRI\Desktop10.0\ArcToolbox\History log either.
Any help would be appreciated.
Anders