Idiot's Guide to the Paraview Python Module: Difference between revisions
From ParaQ Wiki
Jump to navigationJump to search
m (→Exodus Reader) |
|||
Line 26: | Line 26: | ||
# Set timestep to last. | # Set timestep to last. | ||
reader.SetTimeStep(time_step_range[1]) | reader.SetTimeStep(time_step_range[1]) | ||
# Enable the first point array. | # Enable the first point array. | ||
reader.SetPointArrayStatus(point_array_info[0], point_array_info[1]); | reader.SetPointArrayStatus(point_array_info[0], point_array_info[1]); |
Revision as of 16:09, 1 August 2006
Examples
Exodus Reader
import paraview # Create default builtin connection paraview.ActiveConnection = paraview.connect() # Create the reader object reader = paraview.createProxy("sources", "ExodusReader", "sources") reader.SetFileName("/home/myself/Datasets/Exodus/can.ex2") reader.SetApplyDisplacements(1) reader.UpdateVTKObjects() # Update all information properties. reader.UpdatePropertyInformation() # Get the timestep available in the data set. time_step_range = reader.GetTimeStepRangeInfo() print "TimeStep Range: %s" % str(time_step_range) # Get the point arrays available. point_array_info = reader.GetPointArrayInfo() print "Point Arrays: %s" % str(point_array_info) # Set timestep to last. reader.SetTimeStep(time_step_range[1]) # Enable the first point array. reader.SetPointArrayStatus(point_array_info[0], point_array_info[1]); reader.UpdateVTKObjects()