How to high light blocks, make them just like they are selected

Dear Experts,

I want to high light some blocks and the desired the effect just like blocks are selected in paraview.

But seems doing thing like selection is very heavy, is there any more elegant way to do so?

I can refer file: paraview\Qt\Components\pqMultiBlockInspectorWidget.cxx
method “selectBlocks” to make blocks selected, but the comment therein say this is not good…

Thanks in advance!
Best Regards,

You mean programmatically ?

There is no other way than creating an actual selection currently.

Hi Mathieu,

Yes, in programmatic way!

Yes, i can use selection manager to select them.

Any suggestion about create my own source and representation, to reach the same result?

You have to create a selection, there is no other way that I know of.