Link Broken in map

1430
8
Jump to solution
06-23-2017 09:09 AM
Haider_Ali
Occasional Contributor

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

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

Yes... as the help link showed, the *.mapx files are needed first..

arcpy.management.CreateMobileMapPackage(r"C:\data\Basemap1.mapx;C:\data\Map1.mapx", .......

View solution in original post

0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
Haider_Ali
Occasional Contributor

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?

0 Kudos
DanPatterson_Retired
MVP Emeritus

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
Haider_Ali
Occasional Contributor

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? 

DanPatterson_Retired
MVP Emeritus

I am not seeing any *.mapx files in your description, check my previous posts

Haider_Ali
Occasional Contributor

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

0 Kudos
Haider_Ali
Occasional Contributor

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

0 Kudos
DanPatterson_Retired
MVP Emeritus

Yes... as the help link showed, the *.mapx files are needed first..

arcpy.management.CreateMobileMapPackage(r"C:\data\Basemap1.mapx;C:\data\Map1.mapx", .......

0 Kudos