Yes. Use the Python Annotation filter. Attach it to your data source with the field data representing time. If it is named “Time”, your Python Annotation filter should be set to Time[t_index] where t_index is the index of the current timestep selected in ParaView.
Once more, thanks for an answer, and I’ve got following question:
Having time units like Hours since …, how to get date from timestep value?
It is possible via datetime Python module, but I haven’t found the way to do it with Python Annotation. Is it possible?
And some story with additional questions, that made me ask this:
After adding timeaxis to my file I have timesteps like
They are interpreted by Paraview as int, and this is source of my problem.
If i choose Animation View Mode Sequence, i get timestep values between 19820131 and 19820204, for example 19820173, which is bad.
If i choose Animation View Mode Snap To TimeSteps and set Camera to Orbit, while transfer from 19820131 19820204 it jumps a lot and animation is not smooth.
Now I’m trying to build pipeline for visualizing model files with minimum (ideally, no) preprocessing, so I’m trying to avoid file conversions. Maybe, the best solution would be just configurate a reader with all specifications that I want.
I’m afraid I don’t know what your timestep values represent, and I’m not that versed in Python date handling to offer suggestions.
I think you are saying ParaView is displaying a time value that isn’t in your dataset. It is displaying the time requested in ParaView, but the data displayed is the closest available timestep, so there is indeed a mismatch in that regard. I suppose you could round the ParaView time to the closest one in your time array with some Python function.
Hi Cory, I know it is a post long time ago, but I have the same problem right now. I want to add a notation “time” varying with time step into the render view, and now I obtain “time” as a dictionary, which looks like:
I use t_index = animationScene1.TimeKeeper.TimestepValues to get the time step, which has a type of <class 'paraview.servermanager.VectorProperty'> , and looks like [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] (since I have 10 vtk files for 10 timesteps).
I add the quotation mark for time[t_index], and receive the error:
NameError: name 'time' is not defined
But I have define the variable time in the above in python scripting.
I guess I need to insert the variable “time” into the paraview.simple module? Cause I have the same problem when doing this in GUI. So the questions seems to be how to read variable “time” in paraview…