# Question on Programmable Filter using vtkPythonAlgorithmBase

**URL:** https://discourse.paraview.org/t/question-on-programmable-filter-using-vtkpythonalgorithmbase/16495
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [April 17, 2025, 7:43am UTC](https://discourse.paraview.org/t/question-on-programmable-filter-using-vtkpythonalgorithmbase/16495 "2025-04-17T07:43:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Oracle\_0](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/97f17d/32.png) [@Oracle\_0](https://discourse.paraview.org/u/Oracle_0)
#### Post date: [April 17, 2025, 7:43am UTC](https://discourse.paraview.org/t/question-on-programmable-filter-using-vtkpythonalgorithmbase/16495/1 "2025-04-17T07:43:22Z")

</div>

Hi, I have read many post from others earlier and it helped me a lot. I have a question that probably hasn’t asked earlier.

I am using separate python script using vtkPythonAlgorithmBase and loading it through Manage Plugins menu, then using it as a filter on my dataset.

Within script, I am creating vtkStreamTracer and getting it’s output, storing it in vtkPolyData object. It’s works perfectly.

I have couple of questions:

1. How do I change ‘Display’ properties such as LineWidth of the output object in Paraview pipeline from script only? I have tried using functions from paraview.simple within RequestData() function of the script. Unfortunately it goes into infinite recursion where RequestData() calls itself, probably because some functions updates/accesses pipeline objects. I have made a macro to style my Stream Lines after I apply this filter. But I want it to be done within one step: creation of final output Stream Lines and styling of it.
2. Is some of the functions aren’t available in vtkPythonAlgorithm? Like vtkProgrammableFilter is available but not vtkPythonProgrammableFilter.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [April 17, 2025, 12:34pm UTC](https://discourse.paraview.org/t/question-on-programmable-filter-using-vtkpythonalgorithmbase/16495/2 "2025-04-17T12:34:26Z")

</div>

You cannot modify the visualization from _inside_ a filter:

- a plugin defines the filter contents
- a macro _uses_ the filter and defines the display.

To have a one-step workflow, you can have a macro that creates your filter and configures its display.

---

<div class="post-metadata">

### Author: ![Oracle\_0](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/o/97f17d/32.png) [@Oracle\_0](https://discourse.paraview.org/u/Oracle_0)
#### Post date: [April 18, 2025, 2:25am UTC](https://discourse.paraview.org/t/question-on-programmable-filter-using-vtkpythonalgorithmbase/16495/3 "2025-04-18T02:25:29Z")

</div>

Oh, I see. Thanks.
