Refreshing/Reloading files in ParaView

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.

Reload Files in Edit menu.

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.

Prompt to select how to refresh the reader.

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.

11 Responses to Refreshing/Reloading files in ParaView

  1. Aravind V says:

    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.

  2. Aravind V says:

    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.

  3. Utkarsh Ayachit says:

    @Aravind, I’d suggest using the mailing list to pass on the sample VTK file that you’re having issues with.

  4. Jorge says:

    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).

  5. Utkarsh Ayachit says:

    @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.

    • Jorge says:

      @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.

  6. Amine says:

    Is there any way this can be done with prior versions of Paraview (5.0.1 for example)??

  7. Alex says:

    god bless the guy who added “Reload Files” option

  8. umut says:

    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

  9. John Link says:

    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).

Questions or comments are always welcome!