ansys.mapdl.core.Mapdl.cwd#

Mapdl.cwd(dirpath='', **kwargs)#

Changes the current working directory.

Mechanical APDL Command: /CWD

Parameters:
dirpathstr

The full path name of the new working directory.

Notes

After issuing the /CWD command, all new files opened with no default directory specified (via the FILE, copy, or resume commands, for example) default to the new DIRPATH directory.

Examples

Change MAPDL’s working directory to "C:/temp". This assumes that MAPDL running on Windows.

>>> mapdl.cwd("C:/temp")

MAPDL on Linux example:

>>> mapdl.cwd("/tmp/")