<div dir="ltr">Hello,<div><br></div><div>I know it is late but this might help you. The way I do it using python:<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">import vtk<br>data_to_write = vtk.vtkUnstructuredGrid()<br>writer = vtk.vtkXMLUnstructuredGridWriter()<br>number_of_steps = 5<br>writer.SetNumberOfTimeSteps(number_of_steps)  <br>writer.SetInputData(data_to_write)<br>writer.SetFileName('path/to/file')<br>writer.Start()<br>for i in range(number_of_steps):<br>  data_to_write.ShallowCopy(some_input_data)<br>  writer.WriteNextTime(i)<br>writer.Stop()</blockquote><div><br></div><div>Hope this helps anyone</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-17 18:42 GMT+03:00 Bill Greene <span dir="ltr"><<a href="mailto:w.h.greene@gmail.com" target="_blank">w.h.greene@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have been trying to write time-dependent data to<br>
an XML file using vtkXMLUnstructuredGridWriter.<br>
<br>
I found an example,<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/IO/ExodusIIWriter" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK/<wbr>Examples/Cxx/Broken/IO/<wbr>ExodusIIWriter</a>,<br>
that uses vtkTimeSourceExample to write time-dependent data to<br>
an Exodus II file. Despite the word "Broken" in the URL, this appears<br>
to work correctly. But when I modify it to use<br>
vtkXMLUnstructuredGridWriter instead of vtkExodusIIWriter, only the<br>
model data is written.<br>
<br>
Can someone tell me if vtkXMLUnstructuredGridWriter is supposed<br>
to handle time-dependent data, or if not,<br>
how to write an XML file with time-dependent data?<br>
<br>
I am using vtk 7.1.0.<br>
<br>
Thanks,<br>
<br>
Bill Greene<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>