.bat file to automatically load state?

Hello!

Imagine I have a folder structure as:

Base -> Particles -> Content.vtk

Is it possible to define a state using Paraview, which uses “Content.vtk”, and then from command line do something like (pseudo syntax);

loadstate: mystate.pvsm folder: Base

So I can work much faster than having to manually click all the time.

Kind regards

paraview --state=yourState.pvsm will let you load directly without letting you choose the folder. Is that what you want ?

Almost! I would like it so that I can run this state on files in different folders. I might have the same simulation with different resolution for example three folders;

Sim1 (dx = 0.5)
Sim2 (dx = 0.25)
Sim3 (dx = 0.05)

And then inside each folder I will have a vtk with the same name, for example “Content.vtk”, and then I want by using a state in a fast manner to view contents in Paraview.

Kind regards

I’m afraid this is not supported yet. I think it would made sense to add a --state-directory option to cover your use case. Feel free to open an issue on our gitlab :
https://gitlab.kitware.com/paraview/paraview/-/issues

In the meantime, the only work around I can think of is to edit your file with a script in order to change the directory directly in it.

I am not sure if I have done it correctly, but I opened a new issue here:

https://gitlab.kitware.com/paraview/paraview/-/issues/19948

Kind regards

1 Like