Getting Started With Shape Scripts
Shape Scripts are associated with stereotypes and are defined via the Stereotypes tab of the UML Types dialog. To access this dialog, select the Settings | UML menu option. Each stereotype defined can have a Shape Script.
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.
Type the example Shape Scripts in the Edit window. You can click on the Refresh button in order to view the shape in the preview window.
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.
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.
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.
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.