Read blocked Ansys MAPDL archive files written from MAPDL using CDWRITE.
This is effectively pymapdl-reader without the binary reader. It’s been isolated to allow greater flexibility in development.
Installation
Installation through pip:
pip install mapdl-archive
Examples
Load and Plot an MAPDL Archive File
ANSYS archive files containing solid elements (both legacy and modern), can be loaded using Archive and then converted to a VTK object.
from mapdl_archive import Archive, examples
# Sample *.cdb
filename = examples.hexarchivefile
# Read ansys archive file
archive = Archive(filename)
# Print raw data from cdb
for key in archive.raw:
print("%s : %s" % (key, archive.raw[key]))
# Create an unstructured grid from the raw data and plot it
grid = archive.parse_vtk(force_linear=True)
grid.plot(color='w', show_edges=True)
# write this as a vtk xml file
grid.save('hex.vtu')
# or as a vtk binary
grid.save('hex.vtk')
You can then load this vtk file using PyVista or VTK.
import pyvista as pv
grid = pv.UnstructuredGrid('hex.vtu')
grid.plot()
Reading ANSYS Archives
MAPDL archive *.cdb and *.dat files containing elements (both legacy and modern) can be loaded using Archive and then converted to a vtk object:
import mapdl_archive
from mapdl_archive import examples
# Read a sample archive file
archive = mapdl_archive.Archive(examples.hexarchivefile)
# Print various raw data from cdb
print(archive.nnum, archive.nodes)
# access a vtk unstructured grid from the raw data and plot it
grid = archive.grid
archive.plot(color='w', show_edges=True)
You can also optionally read in any stored parameters within the archive file by enabling the read_parameters parameter.
import mapdl_archive
archive = mapdl_archive.Archive('mesh.cdb', read_parameters=True)
# parameters are stored as a dictionary
archive.parameters
Writing MAPDL Archives
Unstructured grids generated using VTK can be converted to ANSYS APDL archive files and loaded into any version of ANSYS using mapdl_archive.save_as_archive in Python followed by CDREAD in MAPDL. The following example using the built-in archive file demonstrates this capability.
import pyvista as pv
from pyvista import examples
import mapdl_archive
# load in a vtk unstructured grid
grid = pv.UnstructuredGrid(examples.hexbeamfile)
script_filename = '/tmp/grid.cdb'
mapdl_archive.save_as_archive(script_filename, grid)
# Optionally read in archive in PyMAPDL and generate cell shape
# quality report
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()
mapdl.cdread('db', script_filename)
mapdl.prep7()
mapdl.shpp('SUMM')
Resulting ANSYS quality report:
------------------------------------------------------------------------------
<<<<<< SHAPE TESTING SUMMARY >>>>>>
<<<<<< FOR ALL SELECTED ELEMENTS >>>>>>
------------------------------------------------------------------------------
--------------------------------------
| Element count 40 SOLID185 |
--------------------------------------
Test Number tested Warning count Error count Warn+Err %
---- ------------- ------------- ----------- ----------
Aspect Ratio 40 0 0 0.00 %
Parallel Deviation 40 0 0 0.00 %
Maximum Angle 40 0 0 0.00 %
Jacobian Ratio 40 0 0 0.00 %
Warping Factor 40 0 0 0.00 %
Any 40 0 0 0.00 %
------------------------------------------------------------------------------
Supported Elements
At the moment, only solid elements are supported by the save_as_archive function, to include:
vtk.VTK_TETRA
vtk.VTK_QUADRATIC_TETRA
vtk.VTK_PYRAMID
vtk.VTK_QUADRATIC_PYRAMID
vtk.VTK_WEDGE
vtk.VTK_QUADRATIC_WEDGE
vtk.VTK_HEXAHEDRON
vtk.VTK_QUADRATIC_HEXAHEDRON
Linear element types will be written as SOLID185, quadratic elements will be written as SOLID186, except for quadratic tetrahedrals, which will be written as SOLID187.
License and Acknowledgments
The mapdl-archive library is licensed under the MIT license.
Release files for mapdl-archive 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mapdl_archive-0.4.2.tar.gz | 162.2 kB | Details |
Built distributions (wheels)
Total release size: 5.6 MB
Release files / mapdl_archive-0.4.2.tar.gz
| Download URL | mapdl_archive-0.4.2.tar.gz |
|---|---|
| Size | 162.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e0d36a309333303e935cdc72cef522c81e46e4fe53b2e64e305126e2b288cb9
|
|
BLAKE2b-256 checksum How to use checksums |
6eece988f685a82ccfc650bf785710580646ca8639470a51df30f2258c5dd3be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp312-abi3-win_amd64.whl
| Download URL | mapdl_archive-0.4.2-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 537.6 kB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
73f8f941fedc600b7a0dad87840a24be3f564626a236fe2850bb4ac22b1b6f55
|
|
BLAKE2b-256 checksum How to use checksums |
7c970e3d7e9a6a834924dce7a4c030bb19a6845c2b9645626d0a94691ab9e929
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | mapdl_archive-0.4.2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 314.9 kB |
| Tags | CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0d2aff768abec095b256f016d42e56d2498f4fb86a0213ad7eba820e815c3cb4
|
|
BLAKE2b-256 checksum How to use checksums |
fb49264bee47d2c6772166452ab467808019bc2f2afed56be49dfaeaa390d68c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | mapdl_archive-0.4.2-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 355.8 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0ede718b355ba51ad2cb87272bdda4e87176841c567ce6b9dc90edecdb46208d
|
|
BLAKE2b-256 checksum How to use checksums |
c6d65c4a9e904f0f0c12652abd11183e4b0fb8bca0f359788a1cd150316df8c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | mapdl_archive-0.4.2-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 292.6 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
801ab98400f0c23b8f934b3fde51083939887542a1d21044fd7a6cbf4724cda5
|
|
BLAKE2b-256 checksum How to use checksums |
fc50de39c8a0b06071be6156cc2ea6d0994cc354b29ec126a02409875d64d800
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp312-abi3-macosx_10_14_x86_64.whl
| Download URL | mapdl_archive-0.4.2-cp312-abi3-macosx_10_14_x86_64.whl |
|---|---|
| Size | 299.3 kB |
| Tags | CPython 3.12 abi3 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
81649887bf99f3ed024fa310f87671c23ff5b80c087f264ad6430e7ec9af5150
|
|
BLAKE2b-256 checksum How to use checksums |
6c38242bfe5a066f969d0a510fb3e967e45ea154f5c673f51a3718ce92c4dead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp311-cp311-win_amd64.whl
| Download URL | mapdl_archive-0.4.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 538.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
da2ac85d2c018c9e1295cb7bc3429fefa43bfb6e0bdc29452accba4037885fcc
|
|
BLAKE2b-256 checksum How to use checksums |
e47d5e088323384011c164cded8da0a913aa7d93b8deed9b75436b5b36970a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | mapdl_archive-0.4.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 322.6 kB |
| Tags | CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
94179cd47e5b57de1f2615afda104d33bb138203853b7a1960ab5d833a57c363
|
|
BLAKE2b-256 checksum How to use checksums |
2f7f9d6d17d203fe3885f37146c19886b60ce3d8e06599bf2dfa44d5aacdc710
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | mapdl_archive-0.4.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 362.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ca0e4b515d09705407f8cdd47ffaf7783cfcff34f29c055d9bc4831c7c9ffb5
|
|
BLAKE2b-256 checksum How to use checksums |
4722fff56a2c86c094817b5a64a4e2c8be6a4a493e7598d45db4e7022a568968
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | mapdl_archive-0.4.2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 296.9 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8807aba329c188750664c2e91b5bbdd3347bc4aee8e90b4bb82f3c77260b874e
|
|
BLAKE2b-256 checksum How to use checksums |
d739af649d680f66734ea1cea43719e8d77e4b5cf0f61351bf97131f0ec71ecc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp311-cp311-macosx_10_14_x86_64.whl
| Download URL | mapdl_archive-0.4.2-cp311-cp311-macosx_10_14_x86_64.whl |
|---|---|
| Size | 303.1 kB |
| Tags | CPython 3.11 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f08000c74d0645e53ee2f36877171e43cedaf578185e34be0aedfd1ac5cd11d
|
|
BLAKE2b-256 checksum How to use checksums |
d9e62521375e4c7ca04950e7b82df26721a47b301331f53367ad4c591d212f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp310-cp310-win_amd64.whl
| Download URL | mapdl_archive-0.4.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 537.9 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1b730b2f53b41b3d40c084d42c008a549260499927657190b324d48ba85c0c1f
|
|
BLAKE2b-256 checksum How to use checksums |
fce234f35f6aab40cbc425fa777384d1b4b157ef4a3f1390f13590d7bbe645d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | mapdl_archive-0.4.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 323.3 kB |
| Tags | CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
7eba447c650f678c257a3df85278f6de0378608098539cce213397f9effa304b
|
|
BLAKE2b-256 checksum How to use checksums |
dfdb524e1a7ad018904b0c31aa7361f26bfe4e27bc2b87082e79b79aa47aaee1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | mapdl_archive-0.4.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 363.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
905aa0735e0aac1b26d99e2828dcf3b2722cf4b250112c8e47ce66a3da8493e7
|
|
BLAKE2b-256 checksum How to use checksums |
1cc710e98c037e6ac3fc8d37fbb32c8e5c3648e143e36a3ba87af9db32da87a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | mapdl_archive-0.4.2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 297.5 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5cc8b604bbcdc81038ee64b22ddfd9a42cf4d487a3a38ac11e0c0a8638979401
|
|
BLAKE2b-256 checksum How to use checksums |
950c0851623119e9f42d55c48ce6ef3f1e1579723d1d37d9168f97456f0c335b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / mapdl_archive-0.4.2-cp310-cp310-macosx_10_14_x86_64.whl
| Download URL | mapdl_archive-0.4.2-cp310-cp310-macosx_10_14_x86_64.whl |
|---|---|
| Size | 303.9 kB |
| Tags | CPython 3.10 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
f4e6e6185268595b4815f5b28099e83a97c59ceb39cf916e6bc4407b3b23209c
|
|
BLAKE2b-256 checksum How to use checksums |
3d272df8af5204d9307fd014d2c091c57ce6ef24a4e41835d873636a9b37103b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency log