# how to get all active sources (sources selected on pipeline) in python

**URL:** https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285
**Category:** ParaView Support
**Created:** [November 4, 2025, 1:09pm UTC](https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285 "2025-11-04T13:09:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 4, 2025, 1:09pm UTC](https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285/1 "2025-11-04T13:09:10Z")

</div>

hello,

how can i get all the selected sources currently in the pipeline?  
i mean if i select box and hold ctr and select sphere, how can i get the two objects on python?  
currectly i found GetActiveSource() but this will only return me the last object i clicked, so sphere. is it possible to also get box object? (in the pipeline at least visually it is selected…)

thanks in advance

---

<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: [November 4, 2025, 1:32pm UTC](https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285/2 "2025-11-04T13:32:48Z")

</div>

> [@otaolafr](#):
>
> GetActiveSource

There is only one active source, the last one that was clicked.

The “selected sources” are not a python concept and cannot be recovered, but you can recover any source by name using `GetSources()`

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 4, 2025, 1:33pm UTC](https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285/3 "2025-11-04T13:33:55Z")

</div>

and from GetSources() it is **not** possible to get the ones that are highlighed?no?

---

<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: [November 4, 2025, 1:34pm UTC](https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285/4 "2025-11-04T13:34:56Z")

</div>

I’m afraid not yet, no.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 4, 2025, 1:59pm UTC](https://discourse.paraview.org/t/how-to-get-all-active-sources-sources-selected-on-pipeline-in-python/17285/5 "2025-11-04T13:59:05Z")

</div>

okey, for anyone that might come in the future looking for a solution to this. as it is not currently implemented and I want to use this for giving two filters selected to python function without having the python objects,

one can use two times GetActiveSource():

`#select filter 0 on pipeline`  
`filter0=GetActiveSource()`  
`#select filter 1 on pipeline`  
`filter1=GetActiveSource()`  
`functionRequiringFilters(filter0,filter1)`

another way i found easier is to make the functionRequiringFilters to accept strings for each input object and then use FindSource

```auto
def functionRequiringFilters(filter0, filter1):

    if isinstance(filter0,str):

        filter0=FindSource(filter0)

    if isinstance(filter1,str):

        filter1=FindSource(filter1)

```

this at least helps a littlebit more, one can then call the function using the name of the filters
