Select to view content in your preferred language

Copying Slides Between SideCars

256
3
04-01-2026 11:21 AM
RobertMatthewmanCTCLUSI
Occasional Contributor

I recently migrated a StoryMap from Classic and am fixing all sorts of weird little issues. I got most of my immersive map elements copied over but there are a few that I would like to integrate into a single scrolling map choreography. It would be a pain to manually remake these slides, because they might each contain a dozen or so audio nodes. 

Does anybody have a method for copying slides/panels from one SideCar to another? There is no obvious way to do this in the editor UI. I'm looking into how to use the API to do this, but most of the resources I've found online for programmatically editing StoryMaps are obsolete/outdated; the blog below shows the StoryMap class as having attributes like .get() and .nodes, neither of which are currently supported class attributes in the ArcGIS API for Python 2.4. 

Automate ArcGIS StoryMap Edits with ArcGIS API for Python

0 Kudos
3 Replies
ThePreatorian
Esri Contributor

@RobertMatthewmanCTCLUSI  Thanks for bringing this to our attention. You should be able to copy slides over with v2.4.3 by following this pseudocode example

sm = Storymap("original")
new = Storymap("new")

# get original sidecar
sidecar = sm.contents[idx]
# get slides to copy
slides = sidecar.slides
copy_slides = slides[2:4]

# get new sidecar and slides if any
new_sidecar = new.contents[idx]
new_slides = new_sidecar.slides

# add copied slides to list
new_slides.extend(copy_slides)

# set on new sidecar
new_sidecar.slides = new_slides

Let me know if you run into any issues with this workflow. 

0 Kudos
RobertMatthewmanCTCLUSI
Occasional Contributor

Thanks for reaching out. This brings up another issue with the API documentation that lists slides as property of Sidecar- I get an AttributeError that no such attribute exists. What is the correct way to access slides/panels as objects?

EDIT: Another note is that .contents is also deprecated, I've been using story.content_list, which I access by index. I have to make a lookup dictionary for myself to be able to find nodes' indexes in the first place.

node_index = {i: node for i, node in enumerate(story.content_list)}

sidecar_indexes = []

for i, node in enumerate(story.content_list):
    if isinstance(node, Sidecar):
        sidecar_indexes.append(i)
AttributeError                            Traceback (most recent call last)
Cell In[12], line 4
      1 print(get_node_by_index(108))
      3 dest_sidecar = get_node_by_index(108)
----> 4 dsc_slides = dest_sidecar.slides
      6 origin_sidecar = get_node_by_index(109)
      7 osc_slides = origin_sidecar.slides

AttributeError: 'Sidecar' object has no attribute 'slides'

 

0 Kudos
ThePreatorian
Esri Contributor

Are you able to upgrade your installed ArcGIS version the 2.4.3? That is what I am using currently and I believe the slide attribution issue was added in this version. 

Similarly `.contents` should also be the most recent way to access the storymaps content.






0 Kudos