Extracting data in pvpython

We are trying to use Paraview to extract data from EXODUS II data files generated by a CFD solver.

Doing this via the GUI is straightforward using PlotSelectionOverTime, but we want to speed this extraction up by using the Python interface. To do this, we are trying to avoid rendering anything, but when we use SpreadsheetView with no Show() commands, we end up failing to print any data.

Is there a more systematic way to print out this data? Our current .py file is able to isolate and select the points of interest already and it’s just the data extraction step that is giving us trouble. Thanks for any tips on this!

please share a simple non-working script.

We ended up resolving this issue by just using SaveData() instead of PlotSelectionOverTime(). Some sample code is attached below for others who might end up in this same place. Thanks!

QuerySelect(QueryString='pressure >= -np.Inf', FieldType='POINT')
selection = ExtractSelection(Input=INPUT_FILE)

SaveData('file.csv', proxy=selection, WriteTimeSteps=1,
    ChooseArraysToWrite=1,
    PointDataArrays=['pressure', 'velocity_'],
    Precision=6,
    AddTime=1)