I am trying to debug a rather difficult issue in 5.10.1 when using ExtractBlock on an OpenFOAM dataset.
In previous versions, extractBlock worked very reliably by setting the BlockIndices to extract. However, I am finding unstable, inconsistent behavior with the new “Selectors” method.
I am using a python script to extract all blocks starting with w, but this fails when there is a dash in the name. So the scripts executes:
Hi, I know this an old question, but as the topic is still relevant and I have a workaround, I wanted to respond.
ParaView represents multiblock and partitioned dataset collection hierarchies with XML. The problem with the ‘-’ is an invalid character for a node name in an XML tree according to pugixml, the XML processing library ParaView uses. So while the selectors that use the paths based on XML element names might not work when a ‘-’ or other non-numeric character are included, as in your case, you can instead use XSLT 1.0 expressions to make the selection you want. In your case, use the selector
//*[starts-with(@label, 'w')]
This will pick all XML elements with the label attribute that starts with w.