Using Macros

The Mechanical application enables you to execute custom functionality that is not included in a standard Mechanical application menu entry via its Run Macro feature. The functionality is defined in a macro - a script that accesses the Mechanical application programming interface (API).

Macros can be written in Microsoft's JScript or VBScript programming languages. Several macro files are provided with the ANSYS Workbench installation under \ANSYS Inc\v182\AISOL\DesignSpace\DSPages\macros. Macros cannot currently be recorded from the Mechanical application.

To access a macro from the Mechanical application:

  1. Choose Run Macro from the Tools menu.

  2. Navigate to the directory containing the macro.

  3. Open the macro. The functionality will then be accessible from the Mechanical application.


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