[Paraview] WriteAllTimeSteps, print current TimeStep

David Larsson david.larsson at sth.kth.se
Sun Sep 13 17:35:30 EDT 2015


Dear all,


I have a very short python script to import a pvd-file (with associated .vtu-files) and simply save the same data in csv-format (see at the bottom of the message). Using:


writer.WriteAllTimeSteps = 1


I can easily make sure that paraview saves all my time steps in subsequent order (without introducing a loop). The script works fine, but as of now I just have to wait with no screen output whilst all files are created. My question is therefore, is there a way to print the current time step that is being saved, such that I can see the progress (if I want)? Is there some kind of write.WriteCurrentTimeStep?


Thanks for your help,


/David


SCRIPT:


from paraview.simple import *
import sys
import os
print "Importing "+sys.argv[1]
print "Creating "+sys.argv[2]
inp = os.getcwd()+"/"+sys.argv[1]
csv_output_directory = os.getcwd()+"/csv"
outp = csv_output_directory+"/"+sys.argv[2]
os.system('mkdir '+csv_output_directory)
reader = OpenDataFile(inp)
#writer = simple.CreateWriter("path/to/solution.csv", reader)
writer = CreateWriter(outp, reader)
writer.WriteAllTimeSteps = 1
writer.FieldAssociation = "Points"
writer.UpdatePipeline()
exit()

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


More information about the ParaView mailing list