The Mechanical application enables you to execute custom functionality that is not included in a standard Mechanical application menu entry via its Scripting feature. The functionality is defined in a macro - a script that accesses the Mechanical application programming interface (API).
Macros can be written in the Python (.py) programming language. For additional information, refer to the Script Examples section of the Scripting in Mechanical Quick Start Guide. Macros cannot currently be recorded from the Mechanical application.
To access a macro from the Mechanical application:
Choose Scripting option from the group on the Automation tab.
Navigate to the directory containing the macro.
Select the macro.
Note: Note: For the current release. Mechanical also supports macros written in the legacy
languages Microsoft's JScript and VBScript. Several macro files are provided with the
Ansys Workbench installation under \ANSYS
Inc\v190\aisol\DesignSpace\DSPages\macros
.