Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Extensibility through stereotype scripts and script items > Defining diagram symbol compartments through stereotypes > Creating a stereotype to apply compartments
  
Creating a stereotype to apply compartments
You can create compartments that display Stereotype and Tag Definition information for the following diagram symbols:
You can show compartments for the following items on diagrams. In addition, you can show compartments for stereotyped versions of these items, for example, a SysML Block can show compartments because it is a stereotyped Class:
Actions on General Flow Diagrams.
Classes, Data Types, Interfaces and Signals on Class Diagrams and Composite Structure Diagrams.
Instances on Object Diagrams.
Parts on Composite Structure Diagrams.
Notes on any diagram type when any item is linked to that Note.
For example, if you define compartments for an Actor and then link that Actor to a Note symbol, that Note symbol will show the Actor's compartments.
To create a stereotype to apply compartments:
1. If you have not created a profile Package, create a profile Package. See Creating a profile Package.
2. Right-click the profile Package in which you want to create the Stereotype, point to New, point to UML, point to Profiles, and then click Stereotype.
3. Name the Stereotype as required.
We recommend that you prefix the name with a prefix that is common to all Stereotypes used in the Profile.
If you want the display name of the Stereotype in Modeler to be different from its real name, on the General tab of the Stereotype's property pages, type the required display name in the Name Alias or Keyword box:
If the Name Alias and Keyword properties are blank, the Stereotype Name is used as the compartment title.
If a Name Alias is specified and the Keyword property is blank, the Stereotype Name Alias is used as the compartment title. Note that the Name Alias name is used for the Stereotype in the Modeler user interface.
If a Keyword is specified, the Stereotype Keyword is used as the compartment title.
4. Open the Stereotype's Property Pages, and then click the Items tab.
5. In the drop-down list box select Model Item Types, and then click the Link button.
6. In the middle or right pane, select the check boxes associated with valid model item types (the Stereotype can be applied only to items whose type is valid).
7. In the middle or right pane, clear the check boxes associated with invalid model item types.
8. Click OK.
9. Click the Style tab.
10. Click the Edit button.
11. Click the Compartments tab.
12. In the Available Compartments list, select the properties, roles, Stereotypes and Tag Definitions for which you want to create compartments.
13. Click the Select button to move the selected items to the Selected Compartments list.
14. If you want to reorder the selected compartments, select a compartment you want to move, and then use the To Top, Up, Down and To Bottom buttons to position the compartment as required.
15. If you want to hide the name of each compartment, clear the Show Headings check box.
16. For reference Tag Definition compartments:
a. If you want to show the full name of referenced items, select the Show Full Names check box.
b. If you want to show the type of referenced items, select the Show Types check box.
c. If you want to show the signatures of referenced items that have signatures, select the Show Signatures check box.
d. If you want to show the Constraints that are applied to referenced items, select the Show Constraints check box.
* 
If you choose to show full names and signatures, the signature is shown for items that have signatures.
17. Click OK.