[Paraview] paraview python scripting equivalent of File->save Data of contour

Enrique Lizarraga-Garcia enrilizaga at gmail.com
Thu Nov 12 18:02:10 EST 2015


Hi all,

I would like to automate exporting csv files from countour of vtk files. I am tracing the steps in paraview, but it somehow misses the last part, saving/exporting as csv. When I do it manually, it saves n csv files, where n is the number of blocks I have in my simulation. I have successfully saved as csv files PlotOverLine output, and thus I have tried similar procedure with this:

(…)
Contour1 = Contour( PointMergeMethod="Uniform Binning" )
Contour1.PointMergeMethod = "Uniform Binning"
Contour1.ContourBy = ['POINTS', 'PHI']
Contour1.ComputeNormals = 0
Contour1.Isosurfaces = [0.0]
source = Contour1
name = "LevelSet.csv"
writer = CreateWriter(name , source)
writer.FieldAssociation = "Points" # or "Cells"
writer.UpdatePipeline()
del writer

However, I obtain the following error message

ERROR: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/ParaViewCore/VTKExtensions/Default/vtkCSVWriter.cxx, line 82
vtkCSVWriter (0x1213ab5a0): Unable to open file: /LevelSet(...).csv
Is there any way to do it?

Thank you very much in advance,
Enrique



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


More information about the ParaView mailing list