Managing macros

When you create a macro, Abaqus/CAE records 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. To manage macros containing a set of Abaqus Scripting Interface commands, select FileMacro Manager from the main menu bar.

This task shows you how to:

See Also
Creating and running a macro
In Other Guides
Abaqus Scripting User's Guide

Context:

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

Your macro will run only in the same context in which it was recorded. For example, if you create a macro that copies a part named gear1 to a new part named gear2, the macro will be executed in a new Abaqus/CAE session only if a part named gear1 exists. When using a plug-in, you may be required to import additional Python modules only the first time you access the plug-in, and this initialization may not be recorded in the macro.

The Abaqus Scripting Interface commands are stored in ASCII text. You can edit abaqusMacros.py with a standard text editor; however, any errors that you introduce into the file will prevent the Macro Manager from displaying. For more information on commands, see the Abaqus Scripting User's Guide.

Tip: If you edit any of the abaqusMacros.py files using a text editor, you can click Reload from the buttons at the bottom of the Macro Manager to update the macro list without closing the manager.