# How to use vtkXdmf3Writer() to write vtkPolyData for multiple time steps?

**URL:** https://discourse.vtk.org/t/how-to-use-vtkxdmf3writer-to-write-vtkpolydata-for-multiple-time-steps/3785
**Category:** Support
**Created:** [July 16, 2020, 4:47am UTC](https://discourse.vtk.org/t/how-to-use-vtkxdmf3writer-to-write-vtkpolydata-for-multiple-time-steps/3785 "2020-07-16T04:47:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![amit112amit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amit112amit/32/2094_2.png) [@amit112amit](https://discourse.vtk.org/u/amit112amit)
#### Post date: [July 16, 2020, 4:47am UTC](https://discourse.vtk.org/t/how-to-use-vtkxdmf3writer-to-write-vtkpolydata-for-multiple-time-steps/3785/1 "2020-07-16T04:47:33Z")

</div>

Hi.  
I looked at the source code for vtkXdmf3Writer.cxx and it seems to support writing multiple time steps to the output XDMF file. I have a code that generates a polydata object at every time step. I want to write all the vtkPolyData objects to the same XDMF file with their corresponding time-step values.

1. How can I associate a time-step value with a vtkPolyData? I saw that there is a static public function vtkDataObject::DATA\_TIME\_STEP() but I couldn’t figure out how to use it.
2. How to pass the vtkPolyData objects for different time steps to the same vtkXdmf3Writer?

Regards,  
Amit
