Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Getting Started With Shape Scripts

Shape Scripts are associated with stereotypes and are defined via the Stereotypes tab of the UML Types dialog. Each stereotype defined can have a Shape Script.

Access:    Settings | UML Types > Stereotypes: Shape Script



See also


You can create a Shape Script for an existing stereotype by selecting the stereotype from the list

Alternatively, you can create new stereotypes by clicking on the New button and giving the stereotype a name - select a base Class and click on the Save button

Once the stereotype is saved, it displays in the list



To override the appearance, select the Shape Script radio button and then click on the Assign button

The Shape Script Editor displays

Shape Script Overview

Shape Script Editor


Type the Shape Scripts in the Edit window

Click on the Refresh button in order to view the shape in the preview window

Writing Scripts


If you define a composite Shape Script (such as the connector at the end of the Example Scripts topic), click on the Next Shape button to page through the components of the shape

Example Scripts


Once you have finished writing your Shape Script, click on the OK button

To save the Shape Script you must click on the Save button on the Stereotypes tab



Once you have created your Shape Script for a particular stereotype, you can assign that stereotype to an element or connector; the appearance reflects the Shape Script you created

To do this, drag and drop the appropriate element or connector into your diagram



Right-click on the element or connector and select the Properties context menu option

Click on the Stereotype field drop-down arrow, select the stereotype you created and click on the OK button

The object's shape now reflects the Shape Script you created



  • If an element's appearance is modified by a Shape Script, many of the options on the Advanced context menu for that element are disabled