[Paraview] Output data across all timesteps with Python

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Jul 15 16:18:53 EDT 2015


If you know the timestep values you're interested in, you can do the
following:

for t in [0, 0.001, 0.002]:
  writer = CreateWriter(".../foo_%d.csv" % t, source)
  writer.FieldAssociation = "Points" # or "Cells"
  writer.UpdatePipeline(t)
  del writer

On Wed, Jul 15, 2015 at 3:32 PM Patrick Savidge <psavidge0 at lbl.gov> wrote:

> Hello Everyone,
>
> I am trying to write a python script to output data for each time step. I
> know to use the following script to save data for one time step:
>
> >>> writer = CreateWriter(".../foo.csv", source)>>> writer.FieldAssociation = "Points" # or "Cells">>> writer.UpdatePipeline()>>> del writer
>
>
> I'm curious how I may do this for every time step?
>
> Thank you for your help,
>
> Patrick
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150715/e0908eca/attachment.html>


More information about the ParaView mailing list