MantisBT - ParaView
View Issue Details
0011200ParaViewFeaturepublic2010-09-01 13:152010-09-15 22:05
Utkarsh Ayachit 
Utkarsh Ayachit 
normalminorhave not tried
closedfixed 
 
3.10 
0011200: Document exporting to CSV from python
Document exporting to CSV from python:

From Alan:
For (dozens of times)
 Open same file
 Plot over line, slightly different line placement
 Integrate 2d plot
 Output data to spreadsheet view
 Export file to .csv file.

This really is the only case I can think of for python and spreadsheet view - trying to format data such that you can export it to a csv file. But, to be able to output a filters output to a .csv file, this is the only way I know how...
No tags attached.
duplicate of 0011151closed Utkarsh Ayachit Trace recorder does not export correctly 
related to 0011150closed Alan Scott Python Trace Recorder does not handle spreadsheet correctly 
Issue History
2010-09-01 13:15Utkarsh AyachitNew Issue
2010-09-01 13:15Utkarsh AyachitRelationship addedrelated to 0011150
2010-09-15 16:56Utkarsh AyachitNote Added: 0022236
2010-09-15 16:56Utkarsh AyachitStatusbacklog => @80@
2010-09-15 16:56Utkarsh AyachitFixed in Version => 3.10
2010-09-15 16:56Utkarsh AyachitResolutionopen => fixed
2010-09-15 16:56Utkarsh AyachitAssigned To => Utkarsh Ayachit
2010-09-15 22:05Alan ScottNote Added: 0022248
2010-09-15 22:05Alan ScottStatus@80@ => closed
2010-09-15 22:11Alan ScottRelationship addedduplicate of 0011151
2011-06-16 13:10Zack GalbreathCategoryFeature Request => Feature

Notes
(0022236)
Utkarsh Ayachit   
2010-09-15 16:56   
commit 7c6c6211c95526af4a2ba22f901dc9b65cfc7fe0
Author: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Date: Wed Sep 15 16:54:45 2010 -0400

    Added CreateWriter function to use writer factory to create a writer.
    
    This makes it easier to create writer based on the filename for writing a
    dataset using the same logic that the GUI does to decide available writers.


-------------------------------------------------------------------------------
Exporting CSV Data

To export a csv from the cell or point data associated with a source, one can use the following:
>>> writer = CreateWriter(".../foo.csv", source)
>>> writer.FieldAssociation = "Points" # or "Cells"
>>> writer.UpdatePipeline()
>>> del writer

Added to Wiki:
http://www.paraview.org/Wiki/ParaView/Python_Scripting#Exporting_CSV_Data [^]
(0022248)
Alan Scott   
2010-09-15 22:05   
I find this an acceptable solution, since this case is probably fairly rare.

Looked at the web page.