# Desperately trying to extract data from point list

**URL:** https://discourse.paraview.org/t/desperately-trying-to-extract-data-from-point-list/5289
**Category:** ParaView Support
**Created:** [September 8, 2020, 12:24pm UTC](https://discourse.paraview.org/t/desperately-trying-to-extract-data-from-point-list/5289 "2020-09-08T12:24:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Richard](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@Richard](https://discourse.paraview.org/u/Richard)
#### Post date: [September 8, 2020, 12:24pm UTC](https://discourse.paraview.org/t/desperately-trying-to-extract-data-from-point-list/5289/1 "2020-09-08T12:24:01Z")

</div>

Hello

I am trying to Extract a selection of points (along a line) from a vtk block. The first part went relatively easy identifying the indices of the points I want to extract. This is what I did

_YToFind = 50._  
_ZToFind = 0._

_plx\_path=r"C:\Users…"_

- 
  - 

_phaseNb = 5_  
_nameFile = plx\_path+r"\1\_"+str(phaseNb+1)+“0\_Phase”+str(phaseNb)+"[Phase\_"+str(phaseNb)+"]\_nodal.pvd"_

_nodalPvd = PVDReader(FileName=nameFile)_  
_GetactiveSource = GetActiveSource()_  
_vtkBlock = paraview.servermanager.Fetch(activeSource)_  
_vtkSource = vtkBlock.GetBlock(1).GetBlock(0)_  
_pointsData = vtkSource.GetPointData()_  
_nPoints = vtkSource.GetNumberOfPoints()_

- 

```
  *

```

IDSelection = []

for i in range(0, nPoints):  
point = vtkSource.GetPoint(i)  
if ((point[1] - YToFind)\*\*2) \< 1e-12 and ((point[2] - ZToFind)\*\*2) \< 1e-12:  
IDSelection.append(i)

But then it became problematic as the FindData s does not issue the complete set of command in combination with Tracing

For instance I tried this

Qstring = '((id == ‘+str(IDSelection[0])  
for i in IDSelection[1:]: Qstring = Qstring + ’ | ( id == ’ +str(i)+ ’ )’  
Qstring = Qstring + ‘)’  
QuerySelect(QueryString=id, FieldType=‘POINT’, InsideOut=0)

But this is not working as there are two blocks in my data and only block 2 should be considered and despite me specifying block 2 in the Find data dialog box, it does not generate the corresponding command and I am no clue on how to code it myself?

Any clue?

Thank you

---

<div class="post-metadata">

### Author: ![Richard](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@Richard](https://discourse.paraview.org/u/Richard)
#### Post date: [September 8, 2020, 12:50pm UTC](https://discourse.paraview.org/t/desperately-trying-to-extract-data-from-point-list/5289/2 "2020-09-08T12:50:12Z")

</div>

I guess I finally found how to do it

ids=[]  
block\_id = 4  
for iEntity in IDSelection:  
ids.append(block\_id)  
ids.append(0)  
ids.append(iEntity)

SelectCompositeDataIDs(IDs=ids, FieldType=‘POINT’, Source=activeSource)

using the IDSelection generation from previous posted code.

But I would really wish the FindData to be less buggy

---

<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: [September 8, 2020, 12:53pm UTC](https://discourse.paraview.org/t/desperately-trying-to-extract-data-from-point-list/5289/3 "2020-09-08T12:53:09Z")

</div>

Great that you found a solution!

If you have suggestion on how to improve the FindData, please feel free to open an issue and to contribute to it in any way you can.

> [@How are features and bug fixes incorporated into ParaView?](https://discourse.paraview.org/t/how-are-features-and-bug-fixes-incorporated-into-paraview/4735):
>
> As with all open source projects, adding features and fixing bugs takes developer effort. That effort may originate from volunteer community contributors, or through paid professional services offered by companies like [Kitware](https://www.kitware.com). Features and bug fixes are prioritized by the needs of contributing community members and by professional services customers. Note that contributions are vetted by a rigorous community review and testing process; therefore it is recommended that significant changes are d…
