Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Extensibility through stereotype scripts and script items > Defining diagram symbol compartments through stereotypes > Overview of defining diagram symbol compartments through stereotypes
  
Overview of defining diagram symbol compartments through stereotypes
Stereotypes provide a controlled way of consistently creating compartments for diagram symbols.
A compartment can display information about a Stereotype or Tag Definition:
For a Stereotype, a compartment can show the name of the Stereotype and each of its Tag Definitions that are set up as Shown Tag Defs for the diagram. For each shown Tag Definition the compartment can show the tagged value.
For a Tag Definition, a compartment can show the name of the Tag Definition and its tagged value. If no value is set for the Tag Definition, the compartment is not shown on the diagram. You can show a compartment for a Tag Definition without setting up that Tag Definition as a Shown Tag Definition for the diagram.
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.
For information about displaying Stereotype and Tag Definition above a diagram item's name for any item type, click here Overview of customizing symbols
A symbol's compartments can be defined in many ways:
For all items.
For items of a specific type.
For an individual item.
For an individual symbol.
For information about how the presentation of a symbol can be customized and how different ways take precedence other each other, click here Overview of customizing symbols
A Stereotype's Property Pages has a Style tab that allows you to specify the Stereotype's style properties, including compartments.
To set up compartments for a Stereotype, on the Style tab of a Stereotype's Property Pages, you click the Edit button to open the Style Modification dialog. You then click the Compartments tab and select the required compartments. You can create a compartment for the Stereotype and each of its Tag Definitions.
For reference compartments, you can optionally show the type of referenced items, show the full name of referenced items, show the signature of referenced items that have signatures, and show the Constraints applied to referenced items. Note that if you choose to show full names and signatures, the signature is shown for referenced items that have signatures.
After applying a Stereotype to a symbol or its underlying item, you can apply the Stereotype's compartments and other style properties to a symbol through its View Options: on the symbol's View Options you click the Style tab, click the Stereotype option, and then from the list select the required Stereotype.
* 
When you set up compartments for a Stereotype, you create style properties for that Stereotype. If you delete those style properties through the Delete button on the Style tab of a Stereotype's Property Pages, any symbols that use that Stereotype to define their presentation will revert to the Default view option.