How to get access from Programmable Filter's script to Custom Filter properties?

Hello 2 all! I try to make something like Modificated Programmable Filter by XML.
I have made Custom Filter and export it to edit XML. I have already add the additional fields:
NumberOfSlice and SliceMode. Question: How can i access from programmable filter script code to added properties values?
Text of XML custom filter:
ProgFilt.xml (3.3 KB)

There’s not an easy or reliable way to do that, I’m afraid. The only way to pass properties to the Programmable Filter is to add to the XML properties that expose the various SetParameter() member functions in vtkPythonProgrammableFilter. These are separate parameters that would be exposed in the GUI, and there isn’t a way I know of to link those properties to properties further up the pipeline such as NumberOfSlices or SliceMode.

I’d recommend looking at the new Python Algorithm-based approach for creating programmable filters. An example is here. One can literally load the python file as a plugin and the filter with appropriate GUI elements can nicely be shown.

Note that the approach @utkarsh.ayachit recommends, while generally superior to the Programmable Filter approach, still does not offer a path to accessing properties from a different filter upstream in the pipeline. The main issue is that programmable filters do not have access to information at the ParaView layer, and that is where the slice properties you seek are located.

Thank you for your answers. I’ll try to find something with RPC(remote procedure call) in ProgrammableFilter shell to realise this idea.

Problem particulary solved by pvpyfilter. I make the GUI interface by generator.