# Not able to save .ply animation for all timesteps

**URL:** https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617
**Category:** ParaView Support
**Created:** [October 21, 2020, 7:31pm UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617 "2020-10-21T19:31:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Krys\_Bangert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/krys_bangert/32/5169_2.png) [@Krys\_Bangert](https://discourse.paraview.org/u/Krys_Bangert)
#### Post date: [October 21, 2020, 7:31pm UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/1 "2020-10-21T19:31:53Z")

</div>

Hello,

I was wondering if I could get some help please. I have created a flow tracing animation from a set of CFD data, however I cannot seem to get the save as .ply function to export all of the timesteps. They are displaying correctly in the GUI, but every timestep file that is created in the specified directory has the same geometry. If I do it as a separate save for each timestep, there’s no problem, however this is incredibly time-consuming.

Any advice would be appreciated,  
Best wishes,  
Krys

---

<div class="post-metadata">

### Author: ![dmreagan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dmreagan/32/12030_2.png) [@dmreagan](https://discourse.paraview.org/u/dmreagan)
#### Post date: [October 26, 2020, 7:51pm UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/2 "2020-10-26T19:51:15Z")

</div>

I have done something similar with glTF. The trick was to run a Python script which exports a file for each timestep. In the animation view, you can add a track called Python. If you double-click the new track, it will show a window where you can edit the script. Then I used the Python trace feature while exporting a glTF to find the Python function I needed.

See more [here](https://discourse.paraview.org/t/how-to-execute-a-python-script-every-step-of-an-animation/4621).

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 27, 2020, 9:38am UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/3 "2020-10-27T09:38:37Z")

</div>

@Krys_Bangert: How do you save the animation ?

---

<div class="post-metadata">

### Author: ![Krys\_Bangert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/krys_bangert/32/5169_2.png) [@Krys\_Bangert](https://discourse.paraview.org/u/Krys_Bangert)
#### Post date: [October 27, 2020, 9:41am UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/4 "2020-10-27T09:41:45Z")

</div>

Thank you for this David, I’ll give it a try.

---

<div class="post-metadata">

### Author: ![Krys\_Bangert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/krys_bangert/32/5169_2.png) [@Krys\_Bangert](https://discourse.paraview.org/u/Krys_Bangert)
#### Post date: [October 27, 2020, 9:44am UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/5 "2020-10-27T09:44:21Z")

</div>

Hi Mathieu, I use the Save data function. Then PLY, and save all timesteps.

---

<div class="post-metadata">

### Author: ![Krys\_Bangert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/krys_bangert/32/5169_2.png) [@Krys\_Bangert](https://discourse.paraview.org/u/Krys_Bangert)
#### Post date: [October 27, 2020, 5:18pm UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/6 "2020-10-27T17:18:52Z")

</div>

Hi All,

I’ve taken onboard your suggestions. I used the trace feature to figure out some of the commands and combined with some code that I got from another very helpful chap [here](https://holzmann-cfd.com/community/training-videos/advanced-post-processing).  
I’ve set it up as a standalone macro script, as I didn’t get much luck in the animation viewer. It seems to be working in a fashion, but exporting the entire timeline for each iteration. Here is the hacked code:

> Blockquote

from paraview.simple import \*

# Change 500 to the amount of timesteps

for num in range(0,9):  
print ('Export scene ’ + str(num))

```
#paraview.simple._DisableFirstRenderCameraReset()

# find source
glyph1 = FindSource('Glyph1')

# set active source
SetActiveSource(glyph1)

# save data
SaveData('E:/Temp CAD/SU Work/CFD/CFD Test4-c/CFD Test 4c_files/dp0/FFF/Fluent/PLY2/test' + str(num) + '.ply', proxy=glyph1, Filenamesuffix='_%.3d',
    EnableColoring=1,
    ColorArrayName=['POINTS', 'velocity'])

animationScene1 = GetAnimationScene()

animationScene1.GoToNext()

```

> Blockquote

Any suggestions why it’s doing this? Any help would be appreciated, I’m really not much of a coder! 😅

---

<div class="post-metadata">

### Author: ![Krys\_Bangert](https://discourse.paraview.org/user_avatar/discourse.paraview.org/krys_bangert/32/5169_2.png) [@Krys\_Bangert](https://discourse.paraview.org/u/Krys_Bangert)
#### Post date: [October 28, 2020, 8:47am UTC](https://discourse.paraview.org/t/not-able-to-save-ply-animation-for-all-timesteps/5617/7 "2020-10-28T08:47:35Z")

</div>

I realised what the error was, missing the “WriteTimeSteps=0,” as I had previous saved the export settings in that menu.

Thank you everyone for the help.
