# How to use SelectionSourceProxy?

**URL:** https://discourse.paraview.org/t/how-to-use-selectionsourceproxy/13900
**Category:** Development
**Created:** [February 9, 2024, 7:46am UTC](https://discourse.paraview.org/t/how-to-use-selectionsourceproxy/13900 "2024-02-09T07:46:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![joint](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joint](https://discourse.paraview.org/u/joint)
#### Post date: [February 9, 2024, 7:46am UTC](https://discourse.paraview.org/t/how-to-use-selectionsourceproxy/13900/1 "2024-02-09T07:46:56Z")

</div>

Hello, dear Paraview developers

I want to have some points in dataset selected before starting very time-consuming calculations to detect which of the points I want to use in those calculations.

I was trying to use this,

```auto
from paraview.selection import *
SelectIDs(IDs=[0, 1], FieldType='CELL')

```

But somewhy it launches the costly calculations which last for a long time.

Dear Mathieu Westphal gave me an advice to use SelectionSourceProxy , but I am not able to find an example on how to use proxies from C++ to have points with certain IDs selected

I would be happy If you could help me with it and give me an example how to use such a proxy from C++

Best regards,  
Mikhail

---

<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: [February 9, 2024, 8:30am UTC](https://discourse.paraview.org/t/how-to-use-selectionsourceproxy/13900/2 "2024-02-09T08:30:13Z")

</div>

Are you using python or C++, it is not clear ?

---

<div class="post-metadata">

### Author: ![joint](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joint](https://discourse.paraview.org/u/joint)
#### Post date: [February 9, 2024, 8:33am UTC](https://discourse.paraview.org/t/how-to-use-selectionsourceproxy/13900/3 "2024-02-09T08:33:05Z")

</div>

Hello Mathieu!

I was trying to use python, but somehow it forces the Filter execute RequestData, which is not desirable

To avoid that, I am trying to use C++.

Best regards

---

<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: [February 9, 2024, 8:40am UTC](https://discourse.paraview.org/t/how-to-use-selectionsourceproxy/13900/4 "2024-02-09T08:40:06Z")

</div>

> [@joint](#):
>
> SelectionSourceProxy

`vtkSMSelectionHelper::NewSelectionSourceFromSelection` should get you going.

[https://kitware.github.io/paraview-docs/latest/cxx/classvtkSMSelectionHelper.html](https://kitware.github.io/paraview-docs/latest/cxx/classvtkSMSelectionHelper.html)
