Display of variable

Hello everyone.

I have a set of VTK files which is a 3D cube. I have attached the link to it below. I have loaded into the paraview and have created an animation view of it.

Now I want to display a variable “i” in the render view itself, as the animation progress. ( The variable ‘i’ has int value)
Example:
I have kept the animation frame number to 600. The start time is 0 and the end time is 6.
So as the animation progresses from 0 to 6, I want to print the variable ‘i’ in the render view
VTK file: https://drive.google.com/open?id=1eN79xMyed0Uj9Uyugv5YSskwtzXsquTn

I hope my query is clear.

Thank you in advance

You can use the Annotate Time Filter to show the current time.

Thanks for your response.
That helped me a bit, but it would print the current time, which is not the required result.
Say for example:
for i in range (1,5)
print(i)
This would print 1 to 4, which is what I want to print.
Is it possible?

@cory.quammen

Is i the timestep index here? Or does i come from somewhere else?

'i" isn’t a time step. I want to print it as a separate variable, whose value varies from -x< i > +x
@cory.quammen

Use the Python Annotation filter with the Expression set to

"".join(map(lambda x: "%d " % x, range(0, 6)))

@cory.quammen
I want the variable to be dynamic. Your expression gives me a static variable where the all the values are printed in the beginning itself.
is it possible to change it as the animation progress?

I’m doing the best I can with the description you have provided up to this point. How do you plan to set the variable “i”? Is it a function of time? Do you want to set it in the GUI. Please be as specific as possible.

@cory.quammen

I really appreciate your help.

I have 7 VTK files ( have provided the link before), whose animation has to be created. During the animation, I want to display a variable " i " to be displayed in the GUI ( side by the 3D cube). The value of “i” varies from ( 16.095 to 7.221, decreasing order) i.e as the animation progress with the time, the value starting from 16.095 up to 7.221 has to printed.

Okay. Assuming “i” varies linearly with time, then use a Python Annotation filter with Expression

16.095 - ((16.095-7.221)*time_index)/7.

You may need to tweak the denominator, but this should work.