[Paraview] Getting File Names from PVD File

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Feb 25 09:23:19 EST 2015


Ken,

> I am trying to recover the file names of the .vtu files that are contained within a .pvd XML file that I am reading in. I am only able to see the timestep data and file name of the PVD itself. Does anyone know where the file= attribute located in the .pvd file stored within Paraview?

The files are placed in the path indicated by the 'file" attribute
relative to the location of the pvd file itself.

> Ultimately I am trying to read in a series of .pvtr files (pointing to vtr files) and export the data as a series of Exodus files with one .e file per timestep. Trying to generate one big .e file directly generates an error due to what appears to be a format error (I assume from the lack of timestep associated the core data beyond the pvd file). Any advice would be appreciated.

You should try using the Python scripting API to open the files and
write them out. Something like this could work:

for i in range(100):
   r  = OpenDataFile("foo_%s..." % i)
   UpdatePipeline(r)
   SaveData("foo_%s.e" % i, r)
   Delete(r)

Utkarsh


More information about the ParaView mailing list