# Cannot add animations using python

**URL:** https://discourse.paraview.org/t/cannot-add-animations-using-python/17126
**Category:** ParaView Support
**Tags:** python
**Created:** [August 22, 2025, 6:55pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126 "2025-08-22T18:55:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![det12](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@det12](https://discourse.paraview.org/u/det12)
#### Post date: [August 22, 2025, 6:55pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126/1 "2025-08-22T18:55:47Z")

</div>

Hi all.

I am trying to automate animation generation. I have a series of exodus files(ex\_0.e,ex\_1.e,ex\_2.e…) that follow each other in time. So the last time step of ex\_0 is the same as the first time step of ex\_1.  
I am trying to set the visibility to shift between each file when their times overlap. I can do this manually using the Time Manager, but that is tedious when I have a many files so I want to automate this using python.

To get the Python syntax I ran a trace of the process, however when I then try to run the trace I get the error that “Attribute visibility does not exist for object RepresentationAnimationHelper”.

Before I post the python code, I want to first check that doing this through Python is the best way forward.

Thanks!

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [August 22, 2025, 8:01pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126/2 "2025-08-22T20:01:40Z")

</div>

David, this sounds like a reasonable approach. It’s possible the Python trace code is not fully capturing everything quite correctly. If you post some code and two of the datasets (or representative examples of such datasets), we can provide some guidance.

---

<div class="post-metadata">

### Author: ![det12](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@det12](https://discourse.paraview.org/u/det12)
#### Post date: [August 22, 2025, 8:30pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126/3 "2025-08-22T20:30:51Z")

</div>

[d\_F.e](https://discourse.paraview.org/uploads/short-url/uoKAU4wodSk8SwdFtja5a20ZeGB.e) (2.2 MB)  
[trace.py](https://discourse.paraview.org/uploads/short-url/pPl3moubm6jcp1In3I0UrBTcq8C.py) (3.7 KB)

Thanks for the reply!

I uploaded a random 1D simulation along with the trace for adding a visibility animation track and modifying a couple of the frames.  
I ran the trace on 5.12.1 and it gives the same error I stated in the original post.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [August 26, 2025, 4:50pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126/4 "2025-08-26T16:50:35Z")

</div>

As you suspected, it looks like the Python tracing code is not generating valid code. Replace

```python
d_FeRepresentationAnimationHelper.Visibility = 0

```

with

```auto
d_FeRepresentationAnimationHelper.SetPropertyWithName("Visibility", 0)

```

and the script will run.

---

<div class="post-metadata">

### Author: ![det12](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@det12](https://discourse.paraview.org/u/det12)
#### Post date: [August 26, 2025, 5:29pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126/5 "2025-08-26T17:29:35Z")

</div>

Awesome, thank you

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [August 26, 2025, 10:46pm UTC](https://discourse.paraview.org/t/cannot-add-animations-using-python/17126/6 "2025-08-26T22:46:29Z")

</div>

I created an issue about this here: [https://gitlab.kitware.com/paraview/paraview/-/issues/23083](https://gitlab.kitware.com/paraview/paraview/-/issues/23083)
