Select to view content in your preferred language

Python API for Map Files and Layer Files

694
1
09-17-2018 05:21 PM
Status: Already Offered
Labels (2)
BobPool1
New Contributor II

The ability to share  as a Map File is a great way to share a common operational view in Pro.  It would be nice to be able to work with these files using python.

At a minimum allow python to save and open  a Map File just like a the layer file. 

Extending the API to provide  R/W access to the name and metadata fields in the Map Properties would make it even better.  This would facilitate publishing these map files to ArcGIS Online.

Extending the API for Layer files to provide R/W access to the name and metadata fields in the layer file would also be very helpful.   This would facilitate publishing Web Layers to ArcGIS Online.  It would also facilitate managing the metadata attributes.

1 Comment
JeffBarrette
Status changed to: Already Offered

Hello Bob,

I know this is an old post and you may have discovered the solution by now.

arcpy.mp Map.exportToMAPX() has been available for a while now.  We don't have API calls to update the internals of a MAPX or PAGX but you can use ArcGISProject.importDocument(), make the changes using the API and then export back to the same MAPX or PAGX.

I hope this helps,

Jeff - layout and arcpy.mp teams