Select to view content in your preferred language

Bookmark map series is None in Python

571
3
07-08-2022 01:16 PM
Labels (1)
samhooper
New Contributor II

I have two different projects: one with map series created from bookmarks and one from a spatial index. If I try to export the bookmark map series in Python, the map series == None, even though I can export it just fine in Arc Pro (and the map series is definitely enabled). If I try on a map series created with a spatial index, it works just fine. So something simple like

 

import arcpy
aprx = arcpy.mp.ArcGISProject('project.aprx')
l = aprx.listLayouts('layout_name')[0]
l.mapSeries

 

will return None for the bookmark series and a valid MapSeries object for the spatial series. I originally thought this was a problem with the version of Pro I was using (2.6) and that it would hopefully get fixed later, but the problem persists in 2.9. 

Has anyone else experienced this issue and perhaps found a workaround? Is there a special way to work with a layout's map series in Python if it was created using bookmarks? I can't find anything about this problem from an internet search.

Thanks!

3 Replies
RolandDuhaime
Occasional Contributor

Hi Samuel,

 

I found this:

 

“Note:This export option is not available for bookmark map series because a bookmark map series doesn't have an index layer.”

On this page:

 

https://pro.arcgis.com/en/pro-app/2.8/help/layouts/export-options.htm

 

If this Is something that you need, I suggest adding it to Esri Ideas here:

 

https://community.esri.com/t5/custom/page/page-id/arcgis-ideas

 

I hope this helps.

 

Thanks,

Roland

 

RolandDuhaime
Occasional Contributor

Can someone at Esri please help us with this spinoff question. On this page:

https://pro.arcgis.com/en/pro-app/2.8/help/layouts/export-options.htm

 

there is a "Note" that has a dark gray background. Is this note specific to selected features or the functionality of Bookmarked Map Series in general? This is the note: 

 

“Note:This export option is not available for bookmark map series because a bookmark map series doesn't have an index layer.”

Thanks,

Roland

 

0 Kudos
JeffBarrette
Esri Regular Contributor

At Pro 3.2, we've introduced a number of new classes.  Relevant to this issue is we:

1) Have a new BookmarkMapSeries Class with its own members.  If a layout has a BMS, it will return that object instead of None.

2) We also have the ability to automate the creation of SpatialMapSeries and BookmarkMapSeries.

3) Finally, we also had the ability to create layouts and most of the layout elements (map frames, graphics, etc)

 

Jeff - Layout and arcpy.mp teams

0 Kudos