# Generation of Annotation from Calculator data

**URL:** https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841
**Category:** ParaView Support
**Created:** [December 6, 2024, 12:16am UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841 "2024-12-06T00:16:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![katterfe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/katterfe/32/15655_2.png) [@katterfe](https://discourse.paraview.org/u/katterfe)
#### Post date: [December 6, 2024, 12:16am UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841/1 "2024-12-06T00:16:24Z")

</div>

I have a question regarding the access of calculator data from an programmable annotation in Paraview, The calculator has generated a new array X. Information say its Multiblock Datasets (Table). How can I access this array X in an programmable annotation? I want to plot this (timedependent) value.

In the programmable annotation I tried something like

input1 = self.GetInputDataObject(0, 0)  
arrayX = input1.GetData(“X”)

But i did not work. Unfortunately I do not really understand how to access the data structure of the calculators results.

Thanks for your help!  
Andre

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 6, 2024, 9:05am UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841/2 "2024-12-06T09:05:33Z")

</div>

A python annotation would make this trivial, does it work for you ?

---

<div class="post-metadata">

### Author: ![katterfe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/katterfe/32/15655_2.png) [@katterfe](https://discourse.paraview.org/u/katterfe)
#### Post date: [December 6, 2024, 10:34am UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841/3 "2024-12-06T10:34:09Z")

</div>

Thanks for your reply! I tried this already. As the Python expression I put X (the name of the array) in. But instead of a single value I get the whole VTKArray() with all data from the calculator. I do not understand how to address a specific column of the data in the calculator.  
Thanks for your help!  
Andre

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 6, 2024, 1:38pm UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841/4 "2024-12-06T13:38:28Z")

</div>

I think this is what you are looking for:

```auto
val = inputs[0].RowData["X"].GetArrays()[0][0]

```

`inputs[0]` is the multiblock input  
`inputs[0].RowData["X"]` is the whole X array on as a composite array  
`GetArrays()[0][0]` recover the first tuple of the first block

hth

---

<div class="post-metadata">

### Author: ![katterfe](https://discourse.paraview.org/user_avatar/discourse.paraview.org/katterfe/32/15655_2.png) [@katterfe](https://discourse.paraview.org/u/katterfe)
#### Post date: [December 6, 2024, 2:40pm UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841/5 "2024-12-06T14:40:10Z")

</div>

Sorry, does not work.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/1/1c5e3996d6abae36f662a7d230b7f7656fc9ad33.jpeg)

Error: Failed to evaluate expression ‘val = inputs[0].RowData[“X”].GetArrays()[0][0]’. The following exception stack should provide additional developer specific information. This typically implies a malformed expression. Verify that the expression is valid.

Variables in current scope are [‘input’, ‘N’, ‘minvtkOriginalPointIds’, ‘q1vtkOriginalPointIds’, ‘medvtkOriginalPointIds’, ‘q3vtkOriginalPointIds’, ‘maxvtkOriginalPointIds’, ‘avgvtkOriginalPointIds’, ‘stdvtkOriginalPointIds’, ‘sumvtkOriginalPointIds’, ‘minX’, ‘q1X’, ‘medX’, ‘q3X’, ‘maxX’, ‘avgX’, ‘stdX’, ‘sumX’, ‘minY’, ‘q1Y’, ‘medY’, ‘q3Y’, ‘maxY’, ‘avgY’, ‘stdY’, ‘sumY’, ‘minZ’, ‘q1Z’, ‘medZ’, ‘q3Z’, ‘maxZ’, ‘avgZ’, ‘stdZ’, ‘sumZ’, ‘vtkValidPointMask’, ‘Time’, ‘X’]

The array is there but…  
THX!!!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 6, 2024, 2:41pm UTC](https://discourse.paraview.org/t/generation-of-annotation-from-calculator-data/15841/6 "2024-12-06T14:41:32Z")

</div>

Please share your data.
