[Paraview] pv python scripting

Su, Simon M CTR USAF (US) simon.m.su.ctr at mail.mil
Fri Apr 18 11:39:02 EDT 2014


Hello,

http://paraview.org/Wiki/ParaView/Python_Scripting has the example on how to list the variables in a dataset.

=============

>>> reader = ExodusIIReader(FileName='.../can.ex2')
# These variables are currently selected
>>> reader.PointVariables
['DISPL', 'VEL', 'ACCL']
# These are available in the file
>>> reader.PointVariables.Available
['DISPL', 'VEL', 'ACCL']
# Enable the DISPL array only
>>> reader.PointVariables = ['DISPL']
# Force read
>>> reader.UpdatePipeline()
# Now check the output. Note: GlobalNodeId is generated automatically by the reader.
>>> reader.PointData[:]
[Array: GlobalNodeId, Array: PedigreeNodeId, Array: DISPL]
====================

If I am doing this in ParaView GUI and I load the can.ex2 data manually and then use Tools->Python Shell to get to python, how do I get a list of the variable? Who would be the parent of PointVariables.Available?  <????>.PointVariables.Available ?

thanks
-simon


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140418/03fd3b54/attachment.html>


More information about the ParaView mailing list