ulib

Mapdl.ulib(fname='', ext='', **kwargs)

Identifies a macro library file.

APDL Command: *ULIB

Parameters
fname

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.

ext

Filename extension (eight-character maximum).

Notes

Identifies a macro library file for the *USE command. A library of macros allows blocks of often used ANSYS commands to be stacked and executed from a single file. The macro blocks must be enclosed within block identifier and terminator lines as shown in the example below. If you want to add comment lines to a macro block, you may place them anywhere within the macro block. (This includes placing them directly on the lines where the macro block identifier and the macro block terminator appear, as shown in the example.) Do not place comment lines (or any other lines) outside of a macro block.

The name of the macro library file is identified for reading on the *ULIB command. The name of the macro block is identified on the *USE command. The commands within the macro block are copied to a temporary file (of the macro block name) during the *USE operation and executed as if a macro file of that name had been created by the user. The temporary file is deleted after it has been used. Macro block names should be acceptable filenames (system dependent) and should not match user created macro file names, since the user macro file will be used first (if it exists) before the library file is searched. Macro blocks may be stacked in any order. Branching [*GO or *IF] external to the macro block is not allowed.

This command is valid in any processor.