# How to add filename as text in the renderview?

**URL:** https://discourse.paraview.org/t/how-to-add-filename-as-text-in-the-renderview/9179
**Category:** ParaView Support
**Created:** [March 14, 2022, 11:48pm UTC](https://discourse.paraview.org/t/how-to-add-filename-as-text-in-the-renderview/9179 "2022-03-14T23:48:15Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Ying](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/fbc32d/32.png) [@Ying](https://discourse.paraview.org/u/Ying)
#### Post date: [March 15, 2022, 8:28pm UTC](https://discourse.paraview.org/t/how-to-add-filename-as-text-in-the-renderview/9179/6 "2022-03-15T20:28:07Z")

</div>

Hi Mathieu, thanks for your information! Now I have another logic to solve this problem. Now I obtain “time” as a dictionary, which looks like:

```auto
{0: '1250.0', 1: '1250.5', 2: '1251.0', 3: '1251.5', 4: '1252.0', 5: '1252.5', 6: '1253.0', 7: '1253.5', 8: '1254.0', 9: '1254.5'}

```

And as [this post](https://discourse.paraview.org/t/show-text-field-changing-every-time-step-from-programmable-filter/1469/5) suggested, I use **Python Annotation** filter to add a timestep-varying text in render\_view:

```auto
pythonAnnotation1 = PythonAnnotation(Input=velocity)
pythonAnnotation1.Expression = time[t_index]
pythonAnnotation1Display = Show(pythonAnnotation1, renderView1)

```

But I received the error “name ‘t\_index’ is not defined”. It seems that I need to **get the current time step** used in active view. Do you know how to do that in paraview?

---

_[View the full topic](https://discourse.paraview.org/t/how-to-add-filename-as-text-in-the-renderview/9179)._
