*ULIB

*ULIB, Fname, Ext, --
Identifies a macro library file.

Compatible Products: – | Pro | Premium | Enterprise | Ent PP | Ent Solver | DYNA

Argument Descriptions

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).

--

Unused field.

Command Default

No macro library file.

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.

ABC! Any valid alphanumeric name (32 characters maximum)
!  identifying this data block
---! ANSYS data input commands
---
---
/EOF! Terminator for this data block
XYZ! Identify another data block (if desired)
---! ANSYS data input commands
---
---
/EOF! Terminator for this data block
(etc.)

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.

Menu Paths

Utility Menu>Macro>Execute Data Block

Release 18.2 - © ANSYS, Inc. All rights reserved.