How to use SelectionSourceProxy?

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,

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

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

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

vtkSMSelectionHelper::NewSelectionSourceFromSelection should get you going.

https://kitware.github.io/paraview-docs/latest/cxx/classvtkSMSelectionHelper.html