Dash (-) in selector's name is ignored


I just would like to flag a bug or at least I believe so. In vtkMultiblockDataSet, the dash inside names is ignored while using selectors.

For example:

my_filter.Selectors = ['test-1']

does the same selection as:

my_filter.Selectors = [‘test1’]

The annoying thing is that if you have a data set with some coordinate in the name (e.g. x_-1, x_0, x_1), selecting only x_-1 would trigger the selection of the x_1 at the same time.

You can find this behaviour in the latest nightly version of Paraview.

Let me know if you know a workaroud to this for the time being :slight_smile:

Thank you very much

Looks like a bug, could you open an issue ?


Sure, done.

Thank you Mathieu


I found a workaround to this issue (python version), I am posting here a snippet just in case somebody needs it:

selectors = [f"//*[contains(@label,‘{x}’)]" for x in names]
extractBlock.Selectors = selectors

Please note that if you put that expression directly in the filter’s constructor, it woul prepend /Root/ and the trick does not work. You need to hard reset the selector’s list like above to get what you want.