# How to select and highlight a SMProxy in paraview?

**URL:** https://discourse.paraview.org/t/how-to-select-and-highlight-a-smproxy-in-paraview/9013
**Category:** ParaView Support
**Created:** [February 18, 2022, 7:19pm UTC](https://discourse.paraview.org/t/how-to-select-and-highlight-a-smproxy-in-paraview/9013 "2022-02-18T19:19:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Cam](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cam/32/8343_2.png) [@Cam](https://discourse.paraview.org/u/Cam)
#### Post date: [February 18, 2022, 7:19pm UTC](https://discourse.paraview.org/t/how-to-select-and-highlight-a-smproxy-in-paraview/9013/1 "2022-02-18T19:19:11Z")

</div>

Dear ParaView community,

I am implementing a feature to select the whole polydata. In this [example](https://kitware.github.io/vtk-examples/site/Cxx/Picking/HighlightWithSilhouette/), an actor is highlighted by `vtkPolyDataSilhouette` by left click. I would like to do the same thing in Paraview.

I already implemented the the UI part in `pqStandardViewFrameActionsImplementation`

 ![image](https://discourse.paraview.org/uploads/default/original/2X/5/5d3f69aefde5730bbbb0115717cb4c9ad7586aa1.png)

I have a toolbar button inside ViewFrame. If togged, it enters interaction mode and allows me to pick the whole polydata where my cursor location belongs.

My understanding is that in `pqRenderViewSelectionReaction.cxx`, I need to call `status = rmp->SelectActors(region, selectedRepresentations, selectionSources);`, where SelectActors() is my own implementation in `vtkSMRenderViewProxy` which returns selectedRepresentations and selectionSources. But I don’t really understand how to use `vtkClientServerStream stream;` to return

```auto
this->SelectInternal(stream, selectedRepresentations, selectionSources,
    multiple_selections, modifier, select_blocks); 

```

I was hoping that using

```auto
vtkNew<vtkPropPicker> picker;
int isPicked = picker->Pick(region[0], region[1], 0, this->GetRenderer());
picker->GetActor();

```

to get the actor where my cursor location belongs. But I am not sure how to convert this to selectedRepresentations and selectionSources as requested in the `pqRenderViewSelectionReaction` workflow.

Any help is appreciated.

Thanks,  
Cam

---

<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 23, 2022, 10:50am UTC](https://discourse.paraview.org/t/how-to-select-and-highlight-a-smproxy-in-paraview/9013/2 "2022-02-23T10:50:31Z")

</div>

This can be a complex question and may require some investigation.
