Hello,
I need to extract cells with specific values of a specific field. For this I am using the following lines of code:
SetActiveSource(filter)
QuerySelect(QueryString=f'(isin({fieldName}, {listOfValues}))', FieldType=FieldType, InsideOut=complementary)
extracted = ExtractSelection(Input=filter,registrationName=registrationName)
SetActiveSource(filter)
ClearSelection()
the listOfValues can be millons therefore this process can be slow, but it works for float, ints and whatever kind of elements (cells or points). I had been trying to improve the speed of this with programmable filters but to whatever i test using numpy and vtk i never get around the same speed as the previous cited lines of code.
So I assume there is no fastest way to do so? If I need to assume that this IS the fastest way (anyone welcome to tell me if there is another fastest way). when doing QuerySelect there is a GUI/visualization part (where the selected elements becomes pink, and then the ClearSelection() will clean it and continue the script, my question is there any way to setoff the visual feedback of the QuerySelect? I am looking to improve further this speed and I execute all the lines at same time, therefore I dont care about ‘showing’ the pink selected cells.