# How to set vtkPropCollection for vtkCellPicker

**URL:** https://discourse.vtk.org/t/how-to-set-vtkpropcollection-for-vtkcellpicker/7624
**Category:** Support
**Created:** [January 12, 2022, 1:00pm UTC](https://discourse.vtk.org/t/how-to-set-vtkpropcollection-for-vtkcellpicker/7624 "2022-01-12T13:00:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhang-qiang-github/32/2519_2.png) [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)
#### Post date: [January 12, 2022, 1:00pm UTC](https://discourse.vtk.org/t/how-to-set-vtkpropcollection-for-vtkcellpicker/7624/1 "2022-01-12T13:00:06Z")

</div>

I find that `vtkPropPicker` can set the `vtkPropCollection` for pick:

```auto
int PickProp(
    double selectionX, double selectionY, vtkRenderer* renderer, vtkPropCollection* pickfrom);

```

This function allows to pick from the specificed prop.

Is it possible to set `vtkPropCollection` for `vtkCellPicker`?

Any suggestion is appreciated~~~

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [January 12, 2022, 1:23pm UTC](https://discourse.vtk.org/t/how-to-set-vtkpropcollection-for-vtkcellpicker/7624/2 "2022-01-12T13:23:53Z")

</div>

I believe this will work: vtkCellPicker is a derived class of vtkAbstractPicker. As such, it has methods like AddPickList(vtkProp\*) and PickFromListOn(). If you have a list of props to pick, turn on PickFronListOn() and add them to the cell picker etc. and perform the pick.

---

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhang-qiang-github/32/2519_2.png) [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)
#### Post date: [January 13, 2022, 3:39am UTC](https://discourse.vtk.org/t/how-to-set-vtkpropcollection-for-vtkcellpicker/7624/3 "2022-01-13T03:39:39Z")

</div>

Thank you very much, it works~~~
