[Paraview] python script for plot-over-line filter

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue May 3 07:08:15 EDT 2011


Jade,

Here's the link to the Wiki about saving CSV files:
http://www.paraview.org/Wiki/ParaView/Python_Scripting#Exporting_CSV_Data

In short, the following script should do it:

>>> writer = CreateWriter(".../foo.csv", source)
>>> writer.FieldAssociation = "Points" # or "Cells"
>>> writer.UpdatePipeline()
>>> del writer

On Tue, May 3, 2011 at 4:47 AM, Jade Mackay <jademackay at gmail.com> wrote:
> Hi Utkarsh,
>
> Thanks for your help, trace is really great. It makes automation of the
> first two tasks trivial, however I am having trouble working out how to
> write the plot over line data to a csv file (the trace functionality
> doesn't generate anything for File>Save Data).
>
> Any suggestions about how to write the PlotOverLine data to csv would be
> great.
>
> Thanks!
> Jade
>
>
> I hadn't tried traceTrace is excellent
>
> On Mon, 2011-05-02 at 10:11 -0400, Utkarsh Ayachit wrote:
>> Have you tried using the Python trace functionality in ParaView? It
>> should help you generate such scripts using the actions you perform in
>> the GUI.
>>
>> Utkarsh
>>
>> On Mon, May 2, 2011 at 10:01 AM, Jade Mackay <jademackay at gmail.com> wrote:
>> > Hello,
>> >
>> > I frequently perform the procedure below, and would prefer to put it in
>> > a python script. Can anyone give me a some assistance in doing this?
>> >
>> > * read a vtu file
>> > * apply the plot-over-line filter, specifying the start and end points,
>> > and number of points
>> > * write the result to a csv file.
>> >
>> > Many thanks,
>> > Jade
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>
>
>


More information about the ParaView mailing list