# Using a c++ plugin on a Python Programmable Filter

**URL:** https://discourse.paraview.org/t/using-a-c-plugin-on-a-python-programmable-filter/7154
**Category:** Development
**Created:** [May 5, 2021, 1:25pm UTC](https://discourse.paraview.org/t/using-a-c-plugin-on-a-python-programmable-filter/7154 "2021-05-05T13:25:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Felipe\_Bordeu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/felipe_bordeu/32/6143_2.png) [@Felipe\_Bordeu](https://discourse.paraview.org/u/Felipe_Bordeu)
#### Post date: [May 5, 2021, 1:25pm UTC](https://discourse.paraview.org/t/using-a-c-plugin-on-a-python-programmable-filter/7154/1 "2021-05-05T13:25:36Z")

</div>

hello,

I have c++ plugin, compiled and working, this plugin has a reader and a filter.

Now I want to use the c++ plugin filter inside a programmable filter but I don’t know how to create the vtk instance of my filter.

I tried to inspect the paraview module and I can see that the filter is loaded but I don’t know how to use it (in the Script section of a ProgrammableFilter):

```
import paraview

PVPTinstance = paraview.modules.vtkRemotingCore.vtkPVPluginTracker().GetInstance()
a = PVPTinstance.GetNumberOfPlugins()
for i in range(a):
    if PVPTinstance.GetPluginName(i) == "ZsetToolsNativePlugin":
        print(PVPTinstance.GetPluginName(i))
        #print(PVPTinstance.GetPlugin(i))
        print(PVPTinstance.GetPluginLoaded(i)) 

```

The output (in the “Output Messages” is :

```
 ZsetToolsNativePlugin
 True

```

Any ideas.  
Thanks  
Felipe

---

<div class="post-metadata">

### Author: ![lhofmann](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@lhofmann](https://discourse.paraview.org/u/lhofmann)
#### Post date: [May 6, 2021, 3:08pm UTC](https://discourse.paraview.org/t/using-a-c-plugin-on-a-python-programmable-filter/7154/2 "2021-05-06T15:08:52Z")

</div>

You would need to Python-wrap your VTK module (that is part of your ParaView plugin) using the CMake function `vtk_module_wrap_python`:  
[https://vtk.org/doc/nightly/html/group\_\_module-wrapping-python.html](https://vtk.org/doc/nightly/html/group__module-wrapping-python.html)

The resulting Python module can then be placed within your ParaView’s Python module search path, such that it can be imported from within a programmable filter.

---

<div class="post-metadata">

### Author: ![MicK7](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mick7/32/1374_2.png) [@MicK7](https://discourse.paraview.org/u/MicK7)
#### Post date: [May 6, 2021, 3:52pm UTC](https://discourse.paraview.org/t/using-a-c-plugin-on-a-python-programmable-filter/7154/3 "2021-05-06T15:52:09Z")

</div>

When using a Plugin from python, the functions are loaded in globals().

Maybe the loaded plugin can be found in paraview.servermanger.ActiveConnection.Modules.{filters/sources/writers}.{YourPluginFunctions}
