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.

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

 

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

Questions or comments are always welcome!