SaveData in Paraview 4.0.1


I am trying to extract a mean value of a property (e.g. the viscosity) from a 3D model, ideally I would like to do it with pvpython to automate it. In the GUI it works some how, using a threshold to confine the region and then applying an integrate filter. Saving the data is a bit messy (using Save Data) but it works. I tried to produce a script with the trace option, but the saving part does not show up.

I am using Paraview 4.0.1 (which apparently uses python 2.7…). I do have the feeling, that this is a Paraview Version problem (unfortunately, I couldn’t find an answer online), but since I am using Paraview on a network and I don’t have admin rights I am a little reluctant to ask IT to update it.

Thanks in advance for the help! Highly appreciated!

When I try to use the SaveData(“sample.csv”,source) command in the script I do get the error:

Traceback (most recent call last):
File “”, line 67, in
NameError: name ‘SaveData’ is not defined

The script looks more or less like this:

try: paraview.simple
except: from paraview.simple import *

Fault_Reactivation_pvd = PVDReader( FileName=’…’)
Threshold12 = Threshold()
Threshold12.Scalars = [‘POINTS’, ‘phase [ ]’]
Threshold12.ThresholdRange = [2.0, 2.0]

IntegrateVariables12 = IntegrateVariables()




Hi Lucas,

Welcome to the ParaView community!

Your version of ParaView is so old that I will be very surprised if you even get an answer. ParaView’s Python has come a long ways since 4.0.1. Couldn’t you just download ParaView as a .zip file to your desktop, unzip it and run it from there?


Hello Alan,

thanks for welcoming me! Indeed, your suggestion was very helpful. I thought I need to build paraview on my linux machine but it works with the binaries as well.