# Get points locations from a QuerySelect()

**URL:** https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823
**Category:** ParaView Support
**Created:** [July 13, 2020, 9:25am UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823 "2020-07-13T09:25:24Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [July 13, 2020, 9:25am UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/1 "2020-07-13T09:25:24Z")

</div>

Hi everyone, I need to get the points informations find by a QuerySelect in a macro, how could I do that ? For example, I want to find the point with the highest value in my dataset and I can achieve that using the find data widget in the UI but I can’t achieve the same result in a python script.

---

<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: [July 13, 2020, 9:33am UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/2 "2020-07-13T09:33:52Z")

</div>

`SelectPoints(query="(yourValue == max(yourValue))")`

---

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [July 13, 2020, 9:51am UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/3 "2020-07-13T09:51:58Z")

</div>

Thanks for your answer ! When I print the output I can’t find any array with my point data. And when I call selection.PointData I get a FieldDataInformation object and I don’t know how to use it.

---

<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: [July 13, 2020, 10:39am UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/4 "2020-07-13T10:39:15Z")

</div>

I’m afraid i’m not following here.

---

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [July 13, 2020, 1:23pm UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/5 "2020-07-13T13:23:02Z")

</div>

I want to set a clip filter on the point location given by selectPoint. Is there any way to get this point data in my python script ?

---

<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: [July 13, 2020, 1:32pm UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/6 "2020-07-13T13:32:30Z")

</div>

You can manually do that. I do not think there is a way to do that automatically.

---

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [July 13, 2020, 1:40pm UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/7 "2020-07-13T13:40:52Z")

</div>

Ok thanks for your answer 🙂

---

<div class="post-metadata">

### Author: ![emmanuel\_madarassou1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/67e7ee/32.png) [@emmanuel\_madarassou1](https://discourse.paraview.org/u/emmanuel_madarassou1)
#### Post date: [July 13, 2020, 3:03pm UTC](https://discourse.paraview.org/t/get-points-locations-from-a-queryselect/4823/8 "2020-07-13T15:03:22Z")

</div>

I find a way to do it and I put it here in case of someone needs it. In order to get points giver by a query selector, you juste have to paraview.serverManager.fetch(yourSelection)

Example:

> myData = XMLRectilinearGridReader(FileName = [blablabla])
> 
> QuerySelect(QueryString=‘(Value== max(Value))’, FieldType=‘POINT’, InsideOut=0)
> 
> SetActiveSource(myData)
> 
> extractSelection = ExtractSelection(Input=myData)
> 
> selectionData = paraview.servermanager.Fetch(extractSelection )
> 
> #now you can access your points with:
> 
> selectionData.GetPoint(id)
