paraview python scripting equivalent of File->save Data -


i automate exporting csv files vtk/vtu files.

right now, steps take are:

  • open paraview
  • load in pvd file stores information vtu files (one each time steps in pde simulation)
  • goto properties tab on left, hit 'apply'
  • file->save data... provide base file name, select 'points' , 'write timesteps'

this writes csv file each timesteps name basefilename#timestepno#.csv

is there way commandline (there's no x server on computer that's doing computations), eg using python interface?

try following in either python shell in ui or using 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() 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -