chain_commands#

property Mapdl.chain_commands[source]#

Chain several mapdl commands.

Commands can be separated with "$" in MAPDL rather than with a line break, so you could send multiple commands to MAPDL with:

mapdl.run("/PREP7$K,1,1,2,3")

This method is merely a convenience context manager to allow for easy chaining of PyMAPDL commands to speed up sending commands to MAPDL.

View the response from MAPDL with Mapdl.last_response.

Notes

Distributed Ansys cannot properly handle condensed data input and chained commands are not permitted in distributed ansys.

Examples

>>> with mapdl.chain_commands:
    mapdl.prep7()
    mapdl.k(1, 1, 2, 3)