Not able to save .ply animation for all timesteps


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,

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.

@Krys_Bangert: How do you save the animation ?

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

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

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.
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:


from paraview.simple import *

Change 500 to the amount of timesteps

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


# find source
glyph1 = FindSource('Glyph1')

# set active source

# 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',
    ColorArrayName=['POINTS', 'velocity'])

animationScene1 = GetAnimationScene()



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

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.