run_as_routine#
- Mapdl.run_as_routine(routine)#
Runs a command or commands at a routine and then revert to the prior routine.
This can be useful to avoid constantly changing between routines.
- パラメーター:
- routine
str A MAPDL routine. For example,
"PREP7"or"POST1".
- routine
Examples
Enter
PREP7and runnumvar, which requiresPOST26, and revert to the prior routine.>>> mapdl.prep7() >>> mapdl.parameters.routine 'PREP7' >>> with mapdl.run_as_routine('POST26'): ... mapdl.numvar(200) >>> mapdl.parameters.routine 'PREP7'