{"id":23250,"library":"ansys-mapdl-reader","title":"Ansys MAPDL Reader","description":"Pythonic interface to read binary and ASCII result files (RST, RTH, etc.) generated by Ansys MAPDL. Version 0.55.2 supports Python 3.10+ and integrates with PyVista for 3D visualization. Active development under the PyAnsys project, with monthly releases.","status":"active","version":"0.55.2","language":"python","source_language":"en","source_url":"https://github.com/pyansys/pymapdl-reader","tags":["ansys","mapdl","finite-elements","result-reader","pyvista"],"install":[{"cmd":"pip install ansys-mapdl-reader","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Primary 3D visualization backend","package":"pyvista","optional":false},{"reason":"VTK is required for many operations","package":"vtk","optional":false},{"reason":"Array handling","package":"numpy","optional":false},{"reason":"Web-based plotting (optional)","package":"trame","optional":true}],"imports":[{"note":"Direct import path","wrong":null,"symbol":"Archive","correct":"from ansys.mapdl.reader import Archive"},{"note":"Main class for reading RST files","wrong":null,"symbol":"ResultFile","correct":"from ansys.mapdl.reader import ResultFile"}],"quickstart":{"code":"from ansys.mapdl.reader import ResultFile\n\n# Replace with your MAPDL result file path\nrst = ResultFile('file.rst')\nprint(rst)\nprint('Number of results:', rst.n_results)\n\n# Get mesh and solution at a specific result set\nmesh = rst.mesh\nresult = rst.result(0)  # first set\nprint('Nodal displacements shape:', result.nodal_displacement.shape)","lang":"python","description":"Open a MAPDL result file and inspect basic properties."},"warnings":[{"fix":"Pass `read_mesh=True` to constructor for older files.","message":"Reading files generated by MAPDL versions prior to 2021 R1 may require explicit encoding or handling of legacy binary formats. Use `ResultFile('file.rst', read_mesh=True)` to force mesh reading.","severity":"gotcha","affected_versions":">=0.50.0"},{"fix":"Use `rst.plot()` or `rst.to_pyvista().save('output.vtk')` instead.","message":"The `save_as_vtk` method is deprecated in favor of using PyVista's `save` functionality. Direct VTK file export via this method may be removed in future releases.","severity":"deprecated","affected_versions":">=0.52.18"},{"fix":"Install with `pip install trame trame-vtk` and either set environment variable or pass `use_trame=True` to plotting functions.","message":"Plotting with Trame (web-based) requires additional setup. Ensure you have `trame` and `trame-vtk` installed, and set `PV_PLOT_USE_TRAME=true` or use the `use_trame` parameter.","severity":"gotcha","affected_versions":">=0.53.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install ansys-mapdl-reader`. If you had the old `pymapdl-reader`, uninstall first: `pip uninstall pymapdl-reader`.","cause":"Library not installed or conflicting with old 'pymapdl-reader' package.","error":"ModuleNotFoundError: No module named 'ansys.mapdl'"},{"fix":"Ensure the file exists and is not corrupted. Check `rst.n_results > 0` before accessing results.","cause":"Trying to access results on an unread or empty result set.","error":"AttributeError: 'NoneType' object has no attribute 'nodal_displacement'"},{"fix":"Verify the file is a valid MAPDL binary result file. If it's ASCII, use `ResultFile('file.rst', mode='ascii')`.","cause":"Incorrect file format or corrupted header in ASCII result files (e.g., .rst converted incorrectly).","error":"ValueError: could not convert string to float: '...'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}