file#

Mapdl.file(fname='', ext='', **kwargs)#

Specifies the data file where results are to be found.

APDL Command: FILE

Parameters:
fnamestr

File name and directory path (248 characters maximum, including the characters needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name.

extstr, default: “rst”

Filename extension (eight-character maximum). If fname has an extension this is ignored.

Return type:

str

Notes

Specifies the Ansys data file where the results are to be found for postprocessing.

Examples

Load a result file that is outside of the current working directory.

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mapdl.post1()
>>> mapdl.file('/tmp/file.rst')