# Access to ParaView and VTK parameters.

**URL:** https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112
**Category:** Development
**Created:** [May 16, 2023, 11:43am UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112 "2023-05-16T11:43:58Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![OlegIT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/71c47a/32.png) [@OlegIT](https://discourse.paraview.org/u/OlegIT)
#### Post date: [May 16, 2023, 11:43am UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/1 "2023-05-16T11:43:58Z")

</div>

Started working with ParaView in C++. There are two questions that I can’t find an answer to.

1. How can I get the numbers of previously selected vertices from my plugin using Extract Selection?
2. How can I change/restore the color of vertices and edges from my plugin?  
If there is documentation on these issues, then please provide a link.

---

<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: [May 16, 2023, 11:46am UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/2 "2023-05-16T11:46:21Z")

</div>

> [@OlegIT](#):
>
> - How can I get the numbers of previously selected vertices from my plugin using Extract Selection?

This is very unclear, could you precise your question ?

> [@](#):
>
> - How can I change/restore the color of vertices and edges from my plugin?

In the display panel, you can change coloring.

---

<div class="post-metadata">

### Author: ![OlegIT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/71c47a/32.png) [@OlegIT](https://discourse.paraview.org/u/OlegIT)
#### Post date: [May 16, 2023, 12:06pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/3 "2023-05-16T12:06:01Z")

</div>

According to point 1. I load the model, select , mark the vertices, apply my plugin. I need to get the numbers of the selected vertices in the RequestData(…) function of my plugin. Whether or not to apply the Extract Selection filter, I don’t know.  
According to point 2. I need to change the color of vertices and edges in my plugin program.

---

<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: [May 16, 2023, 12:27pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/4 "2023-05-16T12:27:42Z")

</div>

> [@OlegIT](#):
>
> mark the vertices

wdym ?

> apply my plugin

Wdym ?

> I need to get the numbers of the selected vertices in the RequestData(…) function of my plugin

It is available in the information panel

---

<div class="post-metadata">

### Author: ![OlegIT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/71c47a/32.png) [@OlegIT](https://discourse.paraview.org/u/OlegIT)
#### Post date: [May 16, 2023, 1:31pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/5 "2023-05-16T13:31:55Z")

</div>

> [@mwestphal](#):
>
> > mark the vertices
> 
> Wdym ?

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

There is a plugin written by me and in the RequestData(…) function you need to get the numbers of the selected vertices as shown in the picture.

> [@mwestphal](#):
>
> > apply my plugin
> 
> Wdym ?

I select the Filters item in the menu, select my filter, click Apply.

> [@mwestphal](#):
>
> It is available in the information panel

Is it possible to get the numbers of the selected vertices directly in the RequestData function?

---

<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: [May 16, 2023, 1:36pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/6 "2023-05-16T13:36:59Z")

</div>

Yes, but you should have a SelectionInput in your filter. It is simpler to add an ExtractSelection filter first instead.

---

<div class="post-metadata">

### Author: ![OlegIT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/71c47a/32.png) [@OlegIT](https://discourse.paraview.org/u/OlegIT)
#### Post date: [May 16, 2023, 2:08pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/7 "2023-05-16T14:08:02Z")

</div>

> [@mwestphal](#):
>
> It is simpler to add an ExtractSelection filter first instead.

I need to apply VTK filter . Right? Where/how can I get a list of selected vertices in my filter program?  
When applying the filter, the model disappears from the render. Is this a ParaView bug?

---

<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: [May 16, 2023, 2:29pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/8 "2023-05-16T14:29:42Z")

</div>

> [@OlegIT](#):
>
> I need to apply VTK filter

The ParaView filter using the ParaView interface.

> Where/how can I get a list of selected vertices in my filter program?

Just read the data ?

> When applying the filter, the model disappears from the render. Is this a ParaView bug?

I think you need to read more about how ParaView works first: [Self-directed Tutorial — ParaView Documentation 5.11.0 documentation](https://docs.paraview.org/en/latest/Tutorials/SelfDirectedTutorial/index.html)

---

<div class="post-metadata">

### Author: ![OlegIT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/71c47a/32.png) [@OlegIT](https://discourse.paraview.org/u/OlegIT)
#### Post date: [May 16, 2023, 4:39pm UTC](https://discourse.paraview.org/t/access-to-paraview-and-vtk-parameters/12112/9 "2023-05-16T16:39:42Z")

</div>

> [@mwestphal](#):
>
> Just read the data ?

Yes, read the list of selected vertices for further processing.

> [@mwestphal](#):
>
> I think you need to read more about how ParaView works first:

Agree
