Once you have selected a default macro language (seeSelecting a default macro language), you can create a new macro by using the Create Macro dialog, see figure below. The dialog allows you to specify a macro language, enter source code, and save it.
To create a new macro
Click Tools > Macros > Create Macro on the MagicDraw main menu. The Create Macro dialog will open, see figure below.
Select a macro language in the Macro Language box.
Enter source code in the text box.
Click to test and make sure that the source code works properly.