Getting Started

Return to Introduction  Previous page  Next page

Getting Started

Shape Scripts are associated with stereotypes and are defined via the Stereotypes tab of the UML Types dialog. In order to access this dialog, select the Settings | UML menu option. Each stereotype defined can have a Shape Script.

StereotypesDialog

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 following dialog displays.

ShapeEditor
 

Enter 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. Once you have finished writing your Shape Script, click on the OK button. In order for your Shape Script to be saved, 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. The appearance reflects the Shape Script you created. To do this, drag and drop a Class element to your diagram.

Note: Shape Scripts do not function in Sequence diagrams.

Right-click on the Class element and click on the Properties button. Click on the Stereotype 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.

ScapeScripts_ClassProperties

See Also