Managing Scripts

In Enterprise Architect, any package within the UML Model can be configured to act as the 'root' of a source code project. By setting compilation scripts, xUnit commands, debuggers and other configuration settings for a package, all contained source code and elements can be built, tested or debugged according to the currently active configuration. Each package can have multiple scripts, but only one is active at any one time. The Package Build Scripts dialog enables you to create and manage those scripts.

To access the Package Build Scripts dialog, either:

  • Press [Shift]+[F12]
  • On the Debug toolbar, click on the drop-down arrow on theScripts icon (the first icon on the left) and select the Package Build Scripts option
  • Select the Project | Execution Analyzer | Package Build Scripts menu option, or
  • Right-click on a package in the Project Browser, and select the Execution Analyzer | Package Build Scripts context menu option.


The Package Build Scripts dialog shows which script is active for the current package, and whether or not the script contains Build, Test, Run, Debug and Deploy components. The current package is as selected in the Project Browser; if a different package is selected, different scripts are available and different breakpoints and markers are applied.

Note that you must close the Package Build Scripts dialog to select a different package in the Project Browser. However, if the Debug window is open ([Alt]+[8]) you can see which debugging configuration is available and selected, and which breakpoints and markers are displayed, as you change packages in the Project Browser.

  • To create a new script, click on the Add button; the Build Script dialog displays.
  • To modify an existing script, highlight the script name in the list and click on the Edit button.
  • To copy a script with a new name, highlight the script name to copy and click on the Copy button; Enterprise Architect prompts you to enter a name for the new copy. Enter the new name in the dialog and click on the OK button. The new copy appears in the list and can be modified as usual.
  • To delete a script, highlight the script name to delete, click on the Delete button, and click on the OK button.
  • To export your scripts, click on the Export button to choose the scripts to export for this package.
  • To import build scripts, click on the Import button to choose a .xml file of the scripts to import.

The Default Language field enables you to set the default language for generating source code for all new elements within this package and its descendents.

Select the Use Live Code Generation checkbox to update your source code instantly as you make changes to your model.

Click on the All Package Scripts button to open a new window that displays all scripts in the current project.

Once you have created new scripts or made changes to existing ones, click on the OK button to confirm the changes, otherwise click on the Cancel button to quit the Package Build Scripts dialog without saving any changes.