I’m trying to update an ExtractSelection filter in python but I can’t figure out how to make it work.
Here is an example of what I’m trying to do :
from paraview.simple import * from paraview.selection import * parent = GetActiveSource() extract_sel = ExtractSelection(Input=parent) ids = [0, 1, 2,] selection = SelectGlobalIDs(IDs=ids, FieldType="CELL", ContainingCells=False, Source=parent, Modifier=None) extract_sel.Selection = selection
My selection is only taken into account if I give it at the initialization of ExtractSelection, but I want to be able to update an existing filter (it’s possible in the GUI).
Any help would be appriciated.