[GIS] Extract .mxd file + data from map package .mpk

arcgis-desktoparcpymap-packagemxdtile-package

I have two applications – a pc app which uses .mpk and a mobile app which uses .tpk
I can generate both, given the .mxd file – but I'd like an easy way to go from a .mpk to .tpk
The idea being that the .mpk is provided to the PC app which at a later time generates .tpk given an area of interest.

Given the .mpk I don't see an easy way of generating a .tpk without going back to an .mxd
I don't see anything in ArcPy (ArgGIS 10.2) which can:
a) open a .mpk and share as a .tpk (arcpy.CreateMapTilePackage_management wants .mxd input)
b) open a .mpk turn in back into an .mxd so I can use function highlighted in a)

I've noted that a .mpk is only an archive which can be opened and probably the .mxd extracted along with all relevant data, still if I didn't have to re-invent the wheel, that would be nice…

Best Answer

As commented by @KHibma:

If I understand your workflow, just use Extract Package (http://resources.arcgis.com/en/help/main/10.1/index.html#//0017000000vq000000) on the mpk, then use CreateMapTile Package (as you referenced) on the extracted mpk, as there is an MXD in there.