I am creating Mobile map package through arcpy but when i open the mmpk file again in ArcGIS Pro all the layer have esclaimation mark stating that layer link is broken , i want to know if there any configuration needed for this to work properly, please note that all layer are added from sql server db
Solved! Go to Solution.
Yes... as the help link showed, the *.mapx files are needed first..
arcpy.management.CreateMobileMapPackage(r"C:\data\Basemap1.mapx;C:\data\Map1.mapx", .......
is it an *.mmpk file?
Is there are a whole load of conditions regarding what can and cannot be included and their original source locations and their coordinate systems. Have you checked the list?
http://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-mobile-map-package.htm
Yes it is an mmpk file, i only need to include feature layer data with symbology so i am using
arcpy.management.CreateMobileMapPackage("MMPKMap", r"d:\test\MobileMapPackage1.mmpk") to create mmpk file, i even tried with gp tool Create mobile package but results were same i.e. esclaimation mark (Click to repair datasource). According to my understanding data will be copied to the mmpk file is it correct , because i think it s saving the reference?
Give an example of the *.mapx files that you have created as in the example in the link I sent. I suspect you haven't got the 'map' files correct. See the example and the other links like 'consolidate map' to prepare your data. You inputs should look like this
outputfile = "d:/Data/Output/sandiego.mmpk"
arcpy.management.CreateMobileMapPackage(r"C:\data\Basemap1.mapx;C:\data\Map1.mapx", outputfile, None, r"\\share\layers\AreaOfInterest
As mentioned above i am using
arcpy.management.CreateMobileMapPackage("MMPKMap", r"d:\test\MobileMapPackage1.mmpk") in which i am giving it map name and i do not think there is any need to provide AreaOfInterest as i already applied definition expression to layers
See the example and the other links like 'consolidate map' to prepare your data.
So according to this mmpk tool does not automatically copy data from database you have first export it in file geodatabase and then run this tool?
I am not seeing any *.mapx files in your description, check my previous posts
i am using example 1
arcpy.management.CreateMobileMapPackage("Basemap1;Basemap2;Map1", r"d:\temp\MobileMapPackage1.mmpk", r"d:\data\MyLocators\AddressLocator.loc", None, "DEFAULT", "SELECT", "Title", "Summary", "description", "Tag", "Credit information", "Usage_Limitations")
In this it need map name not mapx file name
OK after consolidating the map its working now thanks, So the procedure was add data from feature layer(sql server)
then consolidate the map then run CreateMobileMapPackage on mapx generated by consolidation map tool
Yes... as the help link showed, the *.mapx files are needed first..
arcpy.management.CreateMobileMapPackage(r"C:\data\Basemap1.mapx;C:\data\Map1.mapx", .......