I would like to automate exporting csv files from vtk/vtu files.
Right now, the steps I take are:
this writes a csv file for each timesteps with the name basefilename#timestepno#.csv
Is there a way to do this from the commandline (there's no X server on the computer that's doing the computations), eg using the python interface?
Try the following in either the Python Shell in the UI or using the pvpython or pvbatch Python executables.
from paraview import simple
reader = simple.OpenDataFile("..../foo.pvd")
writer = simple.CreateWriter("..../foo.csv", reader)
writer.WriteAllTimeSteps = 1
writer.FieldAssociation = "Points"
writer.UpdatePipeline()