Special Attributes

It is possible to define a number of special features and behaviors of a stereotyped model element, such as the icon to represent it in the Project Browser and Diagram Toolbox, the default location of any image files associated with the stereotype, the dimensions of the element in a diagram, or whether the appearance is defined by a Shape Script. You define these features in your Profile using special attributes that can be applied to either the:

Stereotype elements or

Metaclass elements, referring to the stereotypes that extend them

Access

Ribbon

Design > Element > Attributes

Context Menu

Right-click on element | Features & Properties | Attributes

Keyboard Shortcuts

F9

Set the attribute(s)

Field/Button

Description

See also

Name

Type the name of the attribute (as listed in these tables).

Initial

Type or select the initial value of the attribute.

Close

Click on this button to close the dialog.

Stereotype element Attributes

Attribute

Meaning

See also

_defaultAttributeType

Defines the default type of the new attributes created from the Diagram Toolbox. Use this in a Stereotype element that extends an Attribute Metaclass, and set the 'Initial Value' field to the required attribute type.

If you do not provide this, the system creates attributes with the default type int.

icon

Contains the bitmap file location of the 16x16-pixel icon displayed beside all elements defined by the Stereotype, in the Project Browser. This does not apply to Package elements. The icon is also automatically used as the Diagram Toolbox image wherever the stereotyped element is listed.

For a transparent background, you can use light grey - RGB (192,192,192).

For this attribute to work correctly, also set the _metatype attribute.

_image

Identifies a Shape Script definition, the script for which is created in the 'Initial Value' field.

For this attribute to take effect, you need to set the 'Alternate Image' option when you save the Profile.

Automatically created when any type of connector Metaclass element is dragged from the 'Profile' toolbox page onto a diagram. You can set a value for this attribute in preference to using the _SourceNavigability or _TargetNavigability attributes.

_HideStype

Set the 'Initial Value' field to a comma-separated list of stereotypes to hide those stereotypes by setting the 'Hide Stereotyped Features' filter for each new stereotyped model element.

If the connector is non-navigable, set this attribute to 'Non-Navigable'.

If other values are more appropriate, use the direction attribute (above).

_subtypeProperty

Specifies the fully qualified name of the Tagged Value that is used to generate a popup submenu each time an element with the stereotype is created from the Toolbox.

The Tagged Value is an enumeration and the submenu consists of a command for each enumeration literal. The Tagged Value is initialized with whichever command is selected on the submenu; if none is selected (such as if the user clicks off the submenu) then the default value is used as normal.

For example, if you create a BPMN 2 Activity element, a submenu displays listing the task types such as 'BusinessRule', 'Manual' and 'Receive'. Selecting one of these values sets it as the value of the taskType Tagged Value.

The Tagged Value is effectively the Activity's subtype; in the BPMN 2 profile, in the format profile::stereotype::tag, the subtypeProperty for the Activity stereotype would be: