Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Add Shape Scripts
How to:
To add a Shape Script to a stereotype in a UML Profile (such as an MDG Technology Stereotype Profile), follow the steps below:
Step |
Description |
See Also |
---|---|---|
1 |
On the Profile Package child diagram, select a Stereotype element |
|
2 |
Right-click on the element and select the Attributes context menu option |
|
3 |
In the Attributes Properties dialog, in the Name field, type _image |
|
4 |
Click on the ( ... ) button next to the Initial field The Shape Editor dialog displays |
|
5 |
Enter the Shape Script in the Shape Editor dialog Click on the OK and Close buttons |
|
In some cases, particularly MDG Technology Stereotype Profiles, your Shape Script might include externally-defined images. In this case the Shape Script would include the image method, specifying the image file name prefixed with the technology name.
The Stereotype element now resembles the example below:
Notes:
- If you are creating a Shape Script for an Association Class, be aware that the Shape Script is applied to both the Class part and the Association part; therefore, you might have to include logic in the shape main that tests the type of the element so that you can give separate drawing instructions for Class and for Association
Such logic is not necessary in the:
- shape source or shape target, which are ignored by Classes, or the
- decoration shapes which are ignored by Associations
Learn More: