CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ParaView (http://www.cfd-online.com/Forums/paraview/)
-   -   Export to CSV using CreateWriter (http://www.cfd-online.com/Forums/paraview/122968-export-csv-using-createwriter.html)

julien.decharentenay September 2, 2013 02:37

Export to CSV using CreateWriter
 
Hi,

I am trying to write a python script that export a patch values to a CSV file.

Using the GUI, one would do the following:
1) Load the case (openFoam in my case);
2) Select the relevant item in the pipeline browser;
3) Select File > Save Data.

The code that I entered in the python shell is as follows:

Code:

w = CreateWriter("minX.csv")
w.UpdatePipeline()
del w

It returns neither error message, nor does it create the csv file (which I am looking for in the ParaView directory). If I change the file to be writen to "minX.vtm", it does write file(s) - but not in a format that is easy to read and use.

I am using ParaView 3.98.1 32b on Windows.

Julien

julien.decharentenay September 2, 2013 21:09

I have bypassed my problem by using a Programmable Filter that output the data in a vtkTable.

The code stated above then correctly output the data from the vtkTable.


All times are GMT -4. The time now is 23:18.