[Paraview] PVBatch

Kharche, Sanjay S.R.Kharche at exeter.ac.uk
Fri Sep 26 13:19:15 EDT 2014


Dear All

I am trying to visualise a series of VTK files using pvbatch and I get an error.

I write VTK files with a header as ascii, and then data as a 32 bit int binary. I can visualise individual files. As there are many files, I would like to automate this process. To do so, I produce a pvsm file using ParaView interactively. To loop over the pvsm, I have constructed the following python script:

from paraview.simple import *
servermanager.LoadState("kuntest.pvsm")
SetActiveView(GetRenderView())
for i in range(1,40, 3):
    print 'h%04d.vtk' % (i)
    FindSource("h0001.vtk").FileNames ='h%04d.vtk' % (i)
    WriteImage('h_%06d.png' % (i))

When I try to run the visualisation simulation by the command, I get an error that I do not understand:

h0001.vtk
Traceback (most recent call last):
  File "crn3d_color_sync_frames.py", line 7, in <module>
    FindSource("h0001.vtk").FileNames ='h%04d.vtk' % (i)
AttributeError: 'NoneType' object has no attribute 'FileNames'

Can you comment?

thanks
Sanjay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140926/7025f8d2/attachment.html>


More information about the ParaView mailing list