6.6. Calling Dialog Boxes From a Macro

When the Mechanical APDL program encounters a dialog box UIDL function name (such as Fnc_UIMP_Iso), it displays the appropriate dialog box. Thus, you can launch any Mechanical APDL dialog box by making its function name a separate line in the macro file. When you dismiss that dialog box, the program continues processing the macro starting with the next line after the function call.

Keep in mind that many dialog boxes have a number of dependencies, including that the appropriate Mechanical APDL processor is active and that certain required preexisting conditions are met. For example, launching a dialog box to select nodes first supposes that nodes exist, if no nodes exist the macro will fail when the user clicks OK or Apply.


Note:  If a macro includes GUI functions, the /PMACRO command should be the first command in that macro. This command causes the macro contents to be written to the session log file. This is important, because if you omit the /PMACRO command, Mechanical APDL can't read the session log file to reproduce the Mechanical APDL session.



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