Macro files#

这些 APDL 命令用于构建和执行命令宏。

Note

这里的大部分命令都可以用 Python 替代。例如,不使用宏,而使用 Python 函数。用 os.mkdir 代替 /MKDIR

Warning

这里的许多命令必须在 mapdl.non_interactive 中运行

Mapdl.cfclos(**kwargs)

Closes the "command" file.

Mapdl.cfopen([fname, ext, loc])

Opens a "command" file.

Mapdl.cfwrite([command])

Writes an ANSYS command (or similar string) to a "command" file.

Mapdl.create([fname, ext])

Opens (creates) a macro file.

Mapdl.dflab([dof, displab, forcelab])

Changes degree-of-freedom labels for user custom elements.

Mapdl.end(**kwargs)

Closes a macro file.

Mapdl.mkdir([dir_])

Creates a directory.

Mapdl.msg([lab, val1, val2, val3, val4, ...])

Writes an output message via the ANSYS message subroutine.

Mapdl.pmacro(**kwargs)

Specifies that macro contents be written to the session log file.

Mapdl.psearch([pname])

Specifies a directory to be searched for "unknown command" macro files.

Mapdl.rmdir([dir_])

Removes (deletes) a directory.

Mapdl.tee([label, fname, ext])

Writes a list of commands to a specified file at the same time that the

Mapdl.ulib([fname, ext])

Identifies a macro library file.

Mapdl.use([name, arg1, arg2, arg3, arg4, ...])

Executes a macro file.