# Should a filter request current UPDATE\_TIME\_STEP from input or output?

**URL:** https://discourse.vtk.org/t/should-a-filter-request-current-update-time-step-from-input-or-output/7373
**Category:** Support
**Created:** [December 8, 2021, 3:07pm UTC](https://discourse.vtk.org/t/should-a-filter-request-current-update-time-step-from-input-or-output/7373 "2021-12-08T15:07:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![moritz-h](https://discourse.vtk.org/user_avatar/discourse.vtk.org/moritz-h/32/4386_2.png) [@moritz-h](https://discourse.vtk.org/u/moritz-h)
#### Post date: [December 8, 2021, 3:07pm UTC](https://discourse.vtk.org/t/should-a-filter-request-current-update-time-step-from-input-or-output/7373/1 "2021-12-08T15:07:12Z")

</div>

I want to get the current timestep (as selected in ParaView) within a filter. Looking into other VTK filters and trying to understand what UPDATE\_TIME\_STEP is for, I think I should do this by getting UPDATE\_TIME\_STEP from the output information.

```cpp
vtkInformation* outInfo = outputVector->GetInformationObject(0);
double time outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());

```

So far things are fine, but now I’m trying to use this in my real world filter which has multiple output ports and I have observed several difficulties. Only the first (visible) output port shows the currently selected time from ParaView in UPDATE\_TIME\_STEP, all other visible ports have the previously selected time step. Further, invisible output ports never have any update to UPDATE\_TIME\_STEP.  
To make things more complicated even what is the “first” output port changes to whatever output port is selected first in ParaView.  
How can I know which is the output port with the currently selected time or how can I get the current time independently from the output ports?

I have observed the input information within `RequestUpdateExtent` has UPDATE\_TIME\_STEP set and the value seems to be always the correct one, but is it save and intended to request this from the input?

Maybe as context, I’m also using a streaming demand driven pipeline and I want to stream data from timestep 0 up until the currently selected timestep. Therefore I’m overwriting the UPDATE\_TIME\_STEP from the input port in `RequestUpdateExtent` to select a time step. This is what makes me feel I should not read UPDATE\_TIME\_STEP from the input as it is meant to propagate time step information to the source and later in `RequestData` it only contains my overwritten value anyway.
