Creating and running a macro

The Macro Manager allows you to record a sequence of Abaqus Scripting Interface commands in a macro file while you interact with Abaqus/CAE. Each command corresponds to an interaction with Abaqus/CAE, and replaying the macro reproduces the sequence of interactions. You can use a macro to automate tasks that you find yourself performing repeatedly, such as printing the current viewport or applying a predefined view. For more information on Abaqus Scripting Interface commands, see the Abaqus Scripting User's Guide.

Macros are stored in a file called abaqusMacros.py. Abaqus/CAE searches three directories for abaqusMacros.py, in the following order:

  • The site directory of the Abaqus installation.

  • Your home directory.

  • The current working directory.

The abaqusMacros.py file can exist in more than one of these directories. The Macro Manager contains a list of the existing macros that Abaqus/CAE detected in all of the abaqusMacros.py files. If a macro uses the same name in more than one abaqusMacros.py file, Abaqus/CAE uses the last macro encountered.

To create, delete, or run a macro, select FileMacro Manager from the main menu bar. For more information, see Managing macros.