[Paraview] How to detect valid read in Programmable filter
Dennis Conklin
dennis_conklin at goodyear.com
Mon Aug 3 16:05:57 EDT 2015
All,
I want to try to read some point arrays in the Programmable Filter and take action based on whether or not the arrays have been loaded into Paraview. I am pretty lost in the PF, so take that for what it's worth.
If I try something like
try:
displ=block.PointData['DISPL']
Print displ
except:
Print 'DISPL read failed'
else:
Print 'DISPL read succeeded'
The try never fails - it always prints "DISPL read succeeded, whether I actually loaded the DISPL array or not.
If I print displ, I get an array of values if I loaded the DISPL array into Paraview and a vtk.numpy_interface.dataset_adapter.VTKNoneArray object if I haven't loaded the array.
Not to be too dense, but how do I test to see if I got an array or a VTKNoneArray object?
Thanks
Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150803/0a64740f/attachment.html>
More information about the ParaView
mailing list