# How to read TimeValues or write TimeStep

**URL:** https://discourse.vtk.org/t/how-to-read-timevalues-or-write-timestep/7439
**Category:** Support
**Tags:** file-formats
**Created:** [December 21, 2021, 6:18am UTC](https://discourse.vtk.org/t/how-to-read-timevalues-or-write-timestep/7439 "2021-12-21T06:18:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![olafx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/olafx/32/4286_2.png) [@olafx](https://discourse.vtk.org/u/olafx)
#### Post date: [December 21, 2021, 6:18am UTC](https://discourse.vtk.org/t/how-to-read-timevalues-or-write-timestep/7439/1 "2021-12-21T06:18:31Z")

</div>

I’m writing time dependent files using the `WriteTimeStep(time)` function. This makes a `TimeValues` array in the XML file of whatever times I give. The problem I’m having is that I can’t seem to access `TimeValues` with the reader, and I can’t find it in the information object either. I can access `TimeStep` just fine, but that’s not what I want since I can’t write `TimeStep` it seems.

Two things would solve my problem: being able to access `TimeValues` or, better yet, being able to explicitly write `TimeStep` values one at a time. Any ideas on how to do either of these?

Here’s an example of a file I generate. Notice the inconsistent `TimeValues` and `TimeStep`, which is what happens when using `WriteTimeStep(time)`.

```auto
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
  <UnstructuredGrid TimeValues="
0                                       
0.33333333333                           
0.66666666667                           
1                                       
">
    <Piece NumberOfPoints="16" NumberOfCells="0" >
      <PointData>
        <DataArray type="Float64" Name="Velocity" NumberOfComponents="3" TimeStep="0" format="appended" RangeMin="0.64885146911" RangeMax="2.3077239037" offset="0" />
        <DataArray type="Float64" Name="Velocity" NumberOfComponents="3" TimeStep="1" format="appended" RangeMin="0.7079698782" RangeMax="2.4704857071" offset="1152" />
        <DataArray type="Float64" Name="Velocity" NumberOfComponents="3" TimeStep="2" format="appended" RangeMin="0.98093253033" RangeMax="3.047833036" offset="2288" />
        <DataArray type="Float64" Name="Velocity" NumberOfComponents="3" TimeStep="3" format="appended" RangeMin="0.97300027528" RangeMax="2.6041614188" offset="3424" />
      </PointData>
...

```
