# Associate of toolbar action with programmable filter

**URL:** https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921
**Category:** ParaView Support
**Created:** [July 22, 2020, 7:20am UTC](https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921 "2020-07-22T07:20:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Alberto](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@Alberto](https://discourse.paraview.org/u/Alberto)
#### Post date: [July 22, 2020, 7:20am UTC](https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921/1 "2020-07-22T07:20:08Z")

</div>

Good morning,

my question is how to associate a toolbar action with a python programmable filter.

I already compiled a plugin (.dll) with an xml which initialize a python programmable filter and associate to it a python script. I loaded into Paraview and it works; the filter is displayed in the alphabetical lists and works fine.

Now I’m compiling a plugin which creates a custom toolbar into which I added an action. Through this action I would like to call the filter that I compiled before.

My problem is that I don’t know how to associate the filter execution to the toolbar action.  
It is possible or I have to re-write the filter in C++? Because I need also the XML server manager configuration to set up an interactive menù in Paraview and I don’t know how to do this in C++.

Thank you in advance.

Best regards,

Alberto

---

<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: [July 22, 2020, 7:55am UTC](https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921/2 "2020-07-22T07:55:05Z")

</div>

If both plugins are loaded, you can just create the filter in your action using pqObjectBuilder.

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

---

<div class="post-metadata">

### Author: ![Alberto](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@Alberto](https://discourse.paraview.org/u/Alberto)
#### Post date: [July 22, 2020, 8:13am UTC](https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921/3 "2020-07-22T08:13:50Z")

</div>

Thank you for the answer.

I saw the class description of pqObjectBuilder::CreateFilter()

 ![immagine](https://discourse.paraview.org/uploads/default/original/2X/6/62c667036600f7afeac3ab0765793c7b3e2d00c5.png)

How can I refer to the specific previously uploaded filter in the class initialization?

Thank you

---

<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: [July 22, 2020, 8:27am UTC](https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921/4 "2020-07-22T08:27:39Z")

</div>

group should be “filters” and name should be the name of your filter according to your python file.

`@smproxy.filter(name="NameOfYourFilter",`

---

<div class="post-metadata">

### Author: ![Alberto](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@Alberto](https://discourse.paraview.org/u/Alberto)
#### Post date: [July 22, 2020, 8:57am UTC](https://discourse.paraview.org/t/associate-of-toolbar-action-with-programmable-filter/4921/5 "2020-07-22T08:57:59Z")

</div>

Thank you.

It worked.

Alberto
