0

Is there any way to convert .pvsm file (for ParaView) to .vtk file? I want to write a script that does that. It should work from command line in Linux.

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66

1 Answers1

2

First, note that .pvsm are ParaView state files, so it does not contains the actual data but rather your pipeline analysis (reader, filters, rendering configuratation, etc...). See the doc for more.

Then, you can create ParaView python script that load a statefile and then add VTK writers on specific data from the pipeline.

minimal example

You have statefile "sample.pvsm" that load some data and apply filters. You want to write the output of "MyFilter"

from paraview.simple import *
LoadState("sample.pvsm")
filter = FindSource("MyFilter")
SaveData("sample.vtk", filter)
Nico Vuaille
  • 2,310
  • 1
  • 6
  • 14