# Use the output of the calculator filter in pvpython

**URL:** https://discourse.paraview.org/t/use-the-output-of-the-calculator-filter-in-pvpython/10400
**Category:** ParaView Support
**Created:** [September 23, 2022, 3:02pm UTC](https://discourse.paraview.org/t/use-the-output-of-the-calculator-filter-in-pvpython/10400 "2022-09-23T15:02:57Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 26, 2022, 1:28pm UTC](https://discourse.paraview.org/t/use-the-output-of-the-calculator-filter-in-pvpython/10400/3 "2022-09-26T13:28:13Z")

</div>

Phil,

There isn’t a direct way to plug a value computed by a **Calculator** into a property of a filter. Since you are scripting, it is a little bit easier. **Python Annotation** is actually nice here, because it produces what is expected to be a single string value.

First, you’ll need to update the pipeline up to PythonAnnotation1:

```python
pythonAnnotation1.UpdatePipeline()

```

Then, you’ll need to fetch the data value from it:

```python
stringValue = FetchData(pythonAnnotation1)[0].GetRowData().GetAbstractArray(0).GetValue(0)

```

Use `GetRowData()` because the dataset output of the **Python Annotation** filter is a `vtkTable`. Use `GetAbstractArray()` because a `vtkStringArray` is an abstract array and not a simple `vtkDataArray`. Use `GetValue(0)` to get the one string in the `vtkStringArray`.

You can convert the string value to float with

```python
float(stringValue)

```

and plug the result into `clip1.Value`.

Hope that helps!

---

_[View the full topic](https://discourse.paraview.org/t/use-the-output-of-the-calculator-filter-in-pvpython/10400)._
