# Access Array of Points Coordinates Data

**URL:** https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284
**Category:** ParaView Support
**Tags:** python
**Created:** [January 7, 2020, 1:06pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284 "2020-01-07T13:06:49Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Marc57](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@Marc57](https://discourse.paraview.org/u/Marc57)
#### Post date: [January 7, 2020, 1:06pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/1 "2020-01-07T13:06:49Z")

</div>

Hello everyone,

I would like to access the data point array coming from a clip of a 3D Geometry.

I have the below python code:

```
mesh = STLReader(FileNames=["D:/STL/Part.stl"])
clip1 = Clip(Input=mesh, ClipType = 'Plane')
clip1.ClipType.Origin = [0, 0.0, 0.0]
angleRad = math.radians(0)
 clip1.ClipType.Normal = [0.0, -math.cos(angleRad), math.sin(angleRad)]
a = PlotOnIntersectionCurves(Input = clip1, SliceType = 'Plane') 
SaveData('test.csv',proxy=a)

```

Today I use SaveData to save the data points to external file but I would like to get the points data and treat them before writing them to external file.

I have tried a lot of different things but could not find a way to access the points coordinates before writing them to an external file.

Thanks in advance for any support.

Regards,  
Marc.

---

<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: [January 7, 2020, 1:15pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/2 "2020-01-07T13:15:26Z")

</div>

You need to use [servermanager.fetch](https://kitware.github.io/paraview-docs/latest/python/paraview.servermanager.html#paraview.servermanager.Fetch) for that.

It can be costly if your data is big and if you are working remotelly.

---

<div class="post-metadata">

### Author: ![Marc57](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@Marc57](https://discourse.paraview.org/u/Marc57)
#### Post date: [January 7, 2020, 1:20pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/3 "2020-01-07T13:20:18Z")

</div>

I tried this but maybe not in the good way ☹

> a = PlotOnIntersectionCurves(Input = clip1, SliceType = ‘Plane’)  
> b=paraview.servermanager.Fetch(a)  
> c=b.GetPointData()

But do not know what to do next with c ? I would like to have an array of points coordinates.

Thanks again.

---

<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: [January 7, 2020, 1:31pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/4 "2020-01-07T13:31:49Z")

</div>

```
a = PlotOnIntersectionCurves(Input = clip1, SliceType = ‘Plane’)
b=paraview.servermanager.Fetch(a)
c=b.GetPoint(0)
```

---

<div class="post-metadata">

### Author: ![Marc57](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@Marc57](https://discourse.paraview.org/u/Marc57)
#### Post date: [January 7, 2020, 1:35pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/5 "2020-01-07T13:35:01Z")

</div>

I receive such error when I tried b.GetPoint(0)

Traceback (most recent call last):  
File “”, line 1, in   
AttributeError: ‘vtkCommonDataModelPython.vtkMultiBlockDataSet’ object has no attribute ‘GetPoint’

---

<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: [January 7, 2020, 1:37pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/6 "2020-01-07T13:37:23Z")

</div>

```
a=PlotOnIntersectionCurves(Input = clip1, SliceType = ‘Plane’)
b=paraview.servermanager.Fetch(a)
c=b.GetBlock(0)
d=c.GetPoint(0)
```

---

<div class="post-metadata">

### Author: ![Marc57](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@Marc57](https://discourse.paraview.org/u/Marc57)
#### Post date: [January 7, 2020, 2:32pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/7 "2020-01-07T14:32:20Z")

</div>

Still not able to get it to work:

> > > c=b.GetBlock(0)  
> > > d=c.GetPoint(0)  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in   
> > > AttributeError: ‘NoneType’ object has no attribute ‘GetPoint’

Honestly I am surprised how difficult this can be for such simple task right?

---

<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: [January 7, 2020, 2:42pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/8 "2020-01-07T14:42:48Z")

</div>

In order to inspect your data, you first have to understand how it is formatted.

Looks like you have a multiblock dataset output. If you do not care about it, you could just use a MergeBlock filters before using my first script.

---

<div class="post-metadata">

### Author: ![Marc57](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@Marc57](https://discourse.paraview.org/u/Marc57)
#### Post date: [January 7, 2020, 3:03pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/9 "2020-01-07T15:03:23Z")

</div>

I started it from scratch and it seems now ok to use your last solution.  
Many thanks for all the support. I found it pretty difficult honestly for beginner. Did not find any tutorial on that, specially the MergeBlock part.

Thanks again.

---

<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: [January 7, 2020, 3:06pm UTC](https://discourse.paraview.org/t/access-array-of-points-coordinates-data/3284/10 "2020-01-07T15:06:35Z")

</div>

MergeBlocks filter :  
[https://kitware.github.io/paraview-docs/latest/python/paraview.simple.MergeBlocks.html](https://kitware.github.io/paraview-docs/latest/python/paraview.simple.MergeBlocks.html)

ParaView Tutorial and Guide :  
[https://www.paraview.org/download/](https://www.paraview.org/download/) (documentation)

TBH fetch is quite an advanced feature. If you are looking to just see the values of the points, you should use the Spreadsheet view.
