[Paraview] Load series of VTK files

Ian Krukow i.krukow at tu-braunschweig.de
Fri Mar 6 05:36:01 EST 2015


Hi all,

I want to load a series of VTU files, which are all stored in one 
directory, but not numbered in a way that ParaView recognises them as 
one series. In a python script, I can do it like this:

import glob
import paraview.simple as pv
pattern = 'directory/*.vtu'
files = glob.glob(pattern)
reader = pv.XMLUnstructuredGridReader( FileName=files )

The directory may be an input parameter to the script.
How can I transfer this into the GUI with the directory as a parameter?

I have looked at python macros, but obviously it is not possible to 
define any parameters there.
Is it possible to run a script from the python shell with a parameter?
I also took a look at the Programmable Source. It should be a possible 
solution, but I have not found much explanation of what to do.

Any ideas are welcome.
Kind regards
Ian


More information about the ParaView mailing list