# How to set first output as active?

**URL:** https://discourse.paraview.org/t/how-to-set-first-output-as-active/16133
**Category:** Development
**Created:** [February 9, 2025, 3:51pm UTC](https://discourse.paraview.org/t/how-to-set-first-output-as-active/16133 "2025-02-09T15:51:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jeDuck](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jeDuck](https://discourse.paraview.org/u/jeDuck)
#### Post date: [February 9, 2025, 3:51pm UTC](https://discourse.paraview.org/t/how-to-set-first-output-as-active/16133/1 "2025-02-09T15:51:38Z")

</div>

Dear Paraview developers,  
I have a custom plugin that has two output ports: first one is shown via XYChartView, second via SpreadsheetView. When I apply the filter, Paraview creates two layouts and sets the last output port and last layout as active but I want the chart in XYChartView be active. How can one do that?

---

<div class="post-metadata">

### Author: ![jeDuck](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jeDuck](https://discourse.paraview.org/u/jeDuck)
#### Post date: [February 10, 2025, 7:17am UTC](https://discourse.paraview.org/t/how-to-set-first-output-as-active/16133/2 "2025-02-10T07:17:09Z")

</div>

I figured it out. One should do  
server-\>activeViewSelectionModel()-\>SetCurrentProxy(viewProxy, vtkSMProxySelectionModel::ProxySelectionFlag::CLEAR\_AND\_SELECT);
