Context: Macros are stored in a file called abaqusMacros.py. Abaqus/CAE searches three directories for abaqusMacros.py, in the following order:
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.
Create a macroDelete a macroRun a macro |