Hello:
I have a multi-block data set, where I am using Extract Block filter to seperate some data . I created a python state file, python script looks like this :
# create a new 'Extract Block'
extractBlock1 = ExtractBlock(registrationName='ExtractBlock1', Input=post000041_400003e00h5)
extractBlock1.BlockIndices = [3]
extractBlock1.MaintainStructure = 1
# create a new 'Extract Block'
extractBlock2 = ExtractBlock(registrationName='ExtractBlock2', Input=post000041_400003e00h5)
extractBlock2.BlockIndices = [4]
extractBlock2.MaintainStructure = 1
When I run this script, In GUI, I have to manually choose the dataset again and apply. Is there any elegant way to apply the filter in python script ?
Thanks Cory.
Show operation is bringing the eye icon. But my issue is when I run this script ( with UpdatePipeline and Show method) my block is not automatically selected and applied. As you can see in the image below. This was taken after I run the script, In the block indices, none is selected.
I have also tried giving list names instead of numbers. No luck.
Thanks, @mwestphal. I have tested this on the recent nightly version (ParaView-5.9.0-862-g8ea174d9d4) and this works fine. I have also tested in Paraview 5.9.0 RC1, which works fine too.
Just to keep this documented for future readers. Python codes have changed from Version 5.9.0 RC1 to the recent nightly version.
FYI, the changes in master are a work-in-progress. As discussed here, I am currently making changes to setup the node names to match a sanitized version of the âlabelâ provided, if any. So, in your case, to select Surface, for example, setting selectors to ['//Surface'] will do the trick.
Hi
Is it possible to select using selectors with parts of a string matching? For example there are multiple blocks containing surface.
Or retrive the name of the blocks?