SaveData does not save the multiple timesteps at pvpython

Hello!

I am using Paraview 5.10

I am trying to save data of multiple timsteps automatically from pvpython using a trace that I generated at the GUI and it doesn’t work, it just saves the current timestep in pvpython whereas in the GUI it actually saves all the desired timesteps.
this is the trace I am using:

save data

SaveData(output_folder+'my_file.vtu', proxy=appendAttributes1, ChooseArraysToWrite=0,
    PointDataArrays=['array_1', 'array_2'],
    CellDataArrays=['Area', 'Length'],
    FieldDataArrays=[],
    VertexDataArrays=[],
    EdgeDataArrays=[],
    RowDataArrays=[],
    Writetimestepsasfileseries=1,
    Firsttimestep=0,
    Lasttimestep=-1,
    Timestepstride=1,
    Filenamesuffix='_%d',
    DataMode='Appended',
    EncodeAppendedData=0,
    CompressorType='None',
    CompressionLevel='6')

Thanks very much!
Juan

To save temporal data you should better use an Extractor and to export a python state.

Menu Extractors / Data / VTU to create an extractor. In the properties panel you can configure name and frequency. Then save a python state.

With SaveData you have to manually loop over the timesteps (and configure a new name for each time !)

1 Like

Thanks for your reply,
I tried with extracts in a simple case and it worked, but it doesn’t work in something a little bit more complex like the code in which I am trying to implement (maybe because I save and read some vtu’s during the porcess to obtain the final result which is the one I would need to save for all the timsteps. I think that my only choice will be then to code by myself a loop in my pvpython file to iterate trough the list of my tsteps at the reader.
Thanks anyways!