# Trouble: activeSourcesSelectionModel() gives no active proxy

**URL:** https://discourse.paraview.org/t/trouble-activesourcesselectionmodel-gives-no-active-proxy/14309
**Category:** Development
**Created:** [April 1, 2024, 8:54am UTC](https://discourse.paraview.org/t/trouble-activesourcesselectionmodel-gives-no-active-proxy/14309 "2024-04-01T08:54:53Z")
**Posts on this page:** 2
**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: [April 1, 2024, 8:54am UTC](https://discourse.paraview.org/t/trouble-activesourcesselectionmodel-gives-no-active-proxy/14309/1 "2024-04-01T08:54:54Z")

</div>

Hello dear Paraview developers!

I use

```auto
  vtkSMProxy* proxy = pqActiveObjects::instance().activeSourcesSelectionModel()->GetCurrentProxy();
  vtkSMSourceProxy* source_proxy = vtkSMSourceProxy::SafeDownCast(proxy);

```

to get the current active proxy and later perform some actions with that proxy (create filters, etc)

The problem is after these actions are performed, and I call this code again, source\_proxy = nullptr

Could you help me with this problem, please?

Thank you very much

---

<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: [April 2, 2024, 8:49am UTC](https://discourse.paraview.org/t/trouble-activesourcesselectionmodel-gives-no-active-proxy/14309/2 "2024-04-02T08:49:28Z")

</div>

> [@joint](#):
>
> `activeSourcesSelectionModel`

vtkSMProxySelectionModel is NOT a vtkSMSourceProxy

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