ParaView/Python/Load Sequence: Difference between revisions
From KitwarePublic
< ParaView
Jump to navigationJump to search
Daviddoria (talk | contribs) |
JPouderoux (talk | contribs) mNo edit summary |
||
Line 17: | Line 17: | ||
Render() | Render() | ||
</source> | </source> | ||
Back to [[ParaView/PythonRecipes]]. | |||
{{ParaView/Template/Footer}} |
Latest revision as of 18:37, 16 October 2018
This script will load files named FilePrefix_[Low].vtp, FilePrefix_[Low+1].vtp, ..., FilePrefix_[High].vtp.
For example, to load Car_1.vtp, Car_2.vtp, ..., Car_200.vtp, call LoadMultipleFiles(Car, 1, 200)
<source lang="python">
- !/usr/bin/pvpython
def LoadMultipleFiles(FilePrefix, Low, High): #setup paraview connection from paraview.simple import *
for i in range(Low,High+1): #load files named FilePrefix[Low].vtp, FilePrefix[Low+1].vtp, ..., FilePrefix[High].vtp reader = XMLPolyDataReader(FileName=FilePrefix + str(i) + '.vtp') Show(reader) Render() </source>
Back to ParaView/PythonRecipes.