Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Topic |
Prev | Next |
Define a Stereotype as a Metatype
If you want to hide the identity of a custom element as a stereotyped UML element, you can set the _metatype special attribute in the Stereotype element that defines it. The _metatype attribute also makes custom element types appear in contexts where only Enterprise Architect's inbuilt types would normally appear; for example, in the lists of element types in the Relationship Matrix.
In this example from SysML, Block is defined as a Stereotype element that extends a UML Class.
However, a SysML user is not interested in UML Classes, only in SysML Blocks. If you set the _metatype attribute to Block, any element created from that stereotype, while behaving like a stereotyped Class in most contexts will:
- Show Block <name> rather than Class <name> as the title of its 'Properties' dialog
- Be auto-numbered as Block1 not Class1 on creation, and
- Appear as Block not Class in many other contexts throughout Enterprise Architect
Learn more