CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

Export to CSV using CreateWriter

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 2, 2013, 02:37
Default Export to CSV using CreateWriter
  #1
Senior Member
 
Julien de Charentenay
Join Date: Jun 2009
Location: Australia
Posts: 229
Rep Power: 9
julien.decharentenay is on a distinguished road
Send a message via Skype™ to julien.decharentenay
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 de Charentenay
julien.decharentenay is offline   Reply With Quote

Old   September 2, 2013, 21:09
Default
  #2
Senior Member
 
Julien de Charentenay
Join Date: Jun 2009
Location: Australia
Posts: 229
Rep Power: 9
julien.decharentenay is on a distinguished road
Send a message via Skype™ to julien.decharentenay
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.
__________________
---
Julien de Charentenay
julien.decharentenay is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with CSV export in python scripting AlmostSurelyRob OpenFOAM Paraview & paraFoam 0 June 18, 2013 06:10
Can't find files when install OF2.1.1 on Mac hewei OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 9 July 11, 2012 10:19
CFX - Monitor points - Automatic Export csv nasir CFX 6 November 11, 2011 22:52
Export plane section data to Tepclot or csv eRzBeNgEl STAR-CCM+ 5 September 26, 2011 18:54
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 16:24.