[Paraview] vtkPythonProgrammableFilter, could not find requested method: "SetCellArrayStatus" ?

Dean Neumann dwneumann at gmail.com
Mon Jun 27 13:30:54 EDT 2016


Fellas,  can someone please point me to examples (current as of v5.0.1) of
how a PythonProgrammableFilter accesses the values of properties entered
via a DropDownList on the filter's Properties panel....

I have written a Python programmable filter which extracts user-specified
field arrays from user-specified blocks of multiple (MultiBlock) input
datasets.  I use this to perfrom statistical analysis of values from many
different simulatyions.
The filter works fine when the field array names and block numbers are
hardcoded in the script.
.
Then I used Pat Marion's python_filter_generator.py to wrap the filter in
XML and allow these values to be entered via TextBoxes in the Properties
panel.   That also works fine.  The property TextBoxes are accessible to
the Python script and I can retrieve the user-entered values.

Then I attempted to change the field array input widget from a textbox to a
DropDownList of cell arrays with checkboxes for selection, following the
example in http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Drop_down_list.
The DropDownList does appear correctly, populated correctly, along with
checkboxes for selecting items from the list.  However when I hit Apply I
get the following error:


> ERROR: In
>> C:\bbd\5105004d\build\paraview\src\paraview\ParaViewCore\ServerImplementation\Core\vtkPVSessionCore.cxx,
>> line 390
>
> vtkPVSessionCore (00000000036E8610): Object type:
>> vtkPythonProgrammableFilter, could not find requested method:
>> "SetCellArrayStatus"
>
> or the method was called with incorrect arguments.
>
>
>> while processing
>
> Message 0 = Invoke
>
>   Argument 0 = vtk_object_pointer {vtkPythonProgrammableFilter
>> (000000000D1BCCD0)}
>
>   Argument 1 = string_value {SetCellArrayStatus}
>
>   Argument 2 = string_value {cellInputs}
>
>   Argument 3 = int32_value {0}
>
>
>> ERROR: In
>> C:\bbd\5105004d\build\paraview\src\paraview\ParaViewCore\ServerImplementation\Core\vtkPVSessionCore.cxx,
>> line 391
>
> vtkPVSessionCore (00000000036E8610): Aborting execution for debugging
>> purposes.
>
>
>> ERROR: In
>> C:\bbd\5105004d\build\paraview\src\paraview\ParaViewCore\ServerImplementation\Core\vtkSIProxy.cxx,
>> line 134
>
> vtkSISourceProxy (000000000A29BFE0): Error pushing property state:
>> CellArrayStatus
>
>
I looked at the examples in
ParaView/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml
as suggested, but nowhere do I see examples of how a Python script accesses
the user's selections (only examples of the XML code is shown, not the
Python scripts).  I also perused the site-packages subdirectory of my
installation, but those are all compiled Python and of no help.

I'm sure if I just see some Python code examples I can get this working.  I
have attached my filter if that helps...
many thanks for your help.

Dean Neumann
CEO, Malaspina Lans Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160627/39ec77ac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SliceAcrossDatasets_Dropdown.xml
Type: text/xml
Size: 4793 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160627/39ec77ac/attachment.xml>


More information about the ParaView mailing list