[vtkusers] Time Data in Exodus files

Slaughter, Andrew E andrew.slaughter at inl.gov
Mon Oct 19 13:54:50 EDT 2015


Thanks that helped me figure it out, and I would of never found this on my
own.  Here is what I needed to do.

info = reader.GetExecutive().GetOutputInformation().GetInformationObject(0)
key = vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS()

# info.Get(key) produces an error, not sure why.
n = info.Length(key)
times = [0]*n
for i in range(n):
    times[i] = info.Get(key, i)
print times


On Mon, Oct 19, 2015 at 10:39 AM, David Thompson <david.thompson at kitware.com
> wrote:

> > How do you extract the times (not timesteps) from ExodusIIReader? I am
> using VTK6.3 python bindings.
>
> The reader's output information will have the
> vtkStreamingDemandDrivenPipeline::TIME_STEPS() key set to a vector of
> double values that are the time steps. You can ask the reader for its
> executive, obtain the output information from it, and get the value of the
> TIME_STEPS key from that. It will only be valid after UpdateInformation()
> has been called on the reader.
>
>         David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151019/274c78ee/attachment.html>


More information about the vtkusers mailing list