Since we started using uservoice to collect requests for new features to add to ParaView, one of the top (if not the top) entry had been the request for a reload button. Simple enough request, but a clean solution had been a little challenging to come by since file readers in VTK (and ParaView) don’t uniformly support the ability to reload files.
Recent changes merged in ParaView Git repository, slated to be included in the next ParaView release, version 5.2, finally add support for this feature. A new option, Reload Files, is now available under the Edit menu (or the context menu in the Pipeline Browser). This option is enabled when a reader is active.
On clicking this menu item, for readers that support temporal file series, you will be prompted with a dialog to select whether you want ParaView to look for new files in the file series, or reload the current loaded file itself.
Not to be left behind, the Python API has also been extended to support reloading. You can use the ReloadFiles or ExtendFilesSeries functions newly added to the paraview.simple module.
# For file being modified in place per time step >>> reader = OpenDataFile(file) ... >>> ReloadFiles(reader) # For files being generated per timestep >>> reader = OpenDataFile([file1, file2,...]) ... >>> ExtendFilesSeries(reader)
12 comments to Refreshing/Reloading files in ParaView
I am using paraview 5.1.2 as my VTK files dont even load in paraview 5.2. This option is not available.
VTK version 2.0, This runs smoothly in Paraview 5.1.2. I have trouble in loading the VTK file itself. My system hangs and goes to not responding mode for paraview.
If the VTK loading problem would be fixed in Ver 5.2, it will enable me to use the new reload feature, and this would be great.
@Aravind, I’d suggest using the mailing list to pass on the sample VTK file that you’re having issues with.
It could be useful if “Find new files” would allow you to specify a different data series (pressure_X.csv -> velocity_X.csv for instance).
@jorge, that’s not supported by design. Changing filename for a reader could sometimes imply change in the datatype it produces. ParaView doesn’t like pipelines where the data type changes and can cause issues. Hence we avoid exposing ability to change the filename entirely. For the really adventurous, however, it’s possible to do that using the Python shell.
@Utkarsh Uhm, but when I load a saved state, there’s a prompt offering me to change the filenames for each reader. This is what I’m using at the moment and works well. It is only a bit annoying having to erase all the filters (or close and open the program) and load the state again, but it does work and I can change my .csv filename.
Is there any way this can be done with prior versions of Paraview (5.0.1 for example)??
I am afraid not.
god bless the guy who added “Reload Files” option
The refresh button in the properties window does a similar job, but its action is missing from the tracing functional. Thank you providing the python code
I am using 5.9.2 on Windows 10 with a project that uses multiple files in the TecPlot format. The Reload Files option doesn’t do anything, either from Pipeline Browser Button or with the dataset selected from the File -> Reload Files. The first time it opens the dialog and asks about new or existing files. If the new files option is selected then there is no more action. After that there is no response to any of these commands, but ParaView still works, but with the old files.
When Loading a State File and select the Choose Files option ParaView will increase the array size IF there are more files. However, if there are fewer files then it will NOT decrease the array size (Current Time Toolbar still shows and changes but with the previous number of files).
I’m annoyed by the same situation. Hope it pops up the prompt window whenever I need to reload the file. The max time step does not decrease if the new data set has less time series.