Macro Engine has the capability to record changes in a model. It uses opaque objects to generate macros and record them. This capability is especially useful when you want to redo some of your repetitive tasks.
The following is a list of actions that you can record:
- Creating UML, Stereotype, and DSL elements
- Creating relationships between UML, Stereotype, or DSL elements
To record a macro
- Click Tools > Macros > Record Macro on the MagicDraw main menu. The Record Macro dialog will open, see figure below.
- Select a macro language in the Language box (you will see the default macro language that you have previously selected in that particular box (see Selecting a Default Macro Language).
- Select the
check box and click the Model Scope button to locate a scope in the Containment tree. The generated macros will later record the change in the element by using a relative path that refers to the defined scope. - Click
to start recording. - Work with the model in the scope you have defined.
- Click
to stop recording. The Record Macro dialog will close and the Create Macro dialog will open, see figure below, showing the recorded macros. - Click either
or
.
Record Macro Dialog
The Create Macro Dialog after Successful Recording