How to export rth to vtk using python (pyAnsys or other libs)?
wanghao
Member Posts: 27
**
Comments
-
Hi @wanghao
Do you really want every result in the rth file exported out to a VTK format?In PyDPF there is a vtk_export - seach the documentation for more info. But this only exports out the results that have been gathered to fields.
In PyMAPDL the mesh.grid creates a PyVista/VTK data object of the mesh and we can add fields to it as well. Then use the PyVista save operation to write out the VTK file.
0 -
Hi @Mike Rife
I find the vtk_export class in PyDPF but not works for me.
By the way I found the python library ansys-mapdl-reader and meets my needs by the scripts below.from ansys.mapdl import reader as pymapdl_reader result = pymapdl_reader.read_binary("./file.rth") result.save_as_vtk("file.vtk")
Thanks for reply!
0