A compartment view usage is an area on the element symbol that displays specific element data. You can also use compartments to create new owned elements for the selected element. Any usage or definition element may have compartments listing their owned and inherited elements. The element symbol compartments are a graphical display of the element body in the textual notation.


requirement def MassLimitationRequirement {
        doc /* The actual mass shall be less than or equal to the required mass. */
        attribute massActual : MassValue;
        attribute massReqd : MassValue;
        require constraint {
            massActual <= massReqd
        }
}

On the left: the requirement symbol with documentation, attributes, and require constraints compartments.
On the right: the same requirement with its owned elements declared in the body.

Displaying and suppressing compartments

Many symbols have various compartments available to them which are hidden by default. Follow the the options listed below to check it if the needed compartment is not displayed.

To display or suppress compartments, do one of the following


  • In the view, click the symbol, then click the Compartments button. Select or deselect the particular compartment.

  • In the view, right-click the symbol and in its shortcut menu, click Symbol Style. Then enable or disable the Show Compartment property for the needed compartment in the Symbol Style dialog.
  • In the view, select a symbol and click the Suppress <compartment name> button. 

Displaying or hiding elements in compartments 

Use the Compartment Edit dialog to control the list of elements and properties visible in symbol compartments.

To open the Compartment Edit dialog


  • Select a symbol and click the Compartments button. In the submenu, click the arrow to expand and then click Edit Compartments.

Creating elements via compartments 

You can use compartments to create new owned elements for the selected element.

To create an element via the symbol compartment in a view


  • Do one of the following:
    • Select an element symbol and click the Create Element button on it. In the dropdown menu, select the element you want to create. The new element is created and displayed in its appropriate compartment.
    • Select an element symbol and on the right side of the compartment of the element kind you want to create, click the Create <element kind> button. The new element is created and displayed in its appropriate compartment.

Compartments table

The table below lists the compartments available to specific element symbols based on their element metaclass.

Compartment Element metaclass Compartment Element metaclass
metadata

All namespaces


perfom actions

Definitions, excluding:
EnumDefinition
StateDefinition

Usages, excluding: 
EnumUsage
StateUsage

doc

Package
Definitions
Usages, excluding:
IfActionUsage
WhileActionUsage
ForActionUsage

 subjectCaseUsage
CaseDefinition
RequirementUsage
RequirementDefinition
actorsCaseUsage
CaseDefinition
RequirementUsage
RequirementDefinition

stakeholdersRequirementUsage
RequirementDefinition
 
objective CaseUsage
CaseDefinition
 include use cases

Definitions, excluding:
EnumDefinition

Usages, excluding: 
EnumUsage
ExhibitStateUsage
IfActionUsage
WhileActionUsage
ForActionUsage

parameters

ConstraintUsage
ConstraintDefinition

ActionUsage
ActionDefinition
 

 

frames

RequirementUsage
RequirementDefinition

satisfy requirements

Definitions, excluding:
EnumDefinition

Usages, excluding: 
EnumUsage

 exhibit states

Definitions, excluding:
EnumDefinition

Usages, excluding: 
EnumUsage

require constraintsRequirementUsage
RequirementDefinition
 attributes

Definitions, excluding:
EnumDefinition

Usages, excluding: 
EnumUsage

assume constraintsRequirementUsage
RequirementDefinition
 items

Definitions, excluding:
EnumDefinition

Usages

assert constraintsPartUsage
PartDefinition
RequirementUsage
RequirementDefinition
 enumsEnumerationDefinition
constraintsCaseUsage
CaseDefinition
RequirementUsage
RequirementDefinition
 actions

Definitions, excluding:
EnumDefinition

Usages, excluding: 
EnumUsage

parts

Definitions, excluding:
EnumDefinition

Usages, excluding: 
EnumUsage
IfActionUsage
WhileActionUsage
ForActionUsage

 ends

ConnectorAsUsage
ConnectionDefinition

ports

PartUsage
PartDefinition
PortUsage
PortDefinition

 members

Package

while condition

WhileActionUsage

 features (name not displayed in compartment)

MetadataUsage

until condition

WhileActionUsage

 

rules

Part usage or definition specializing Policies::StyleSheet

for iterator

ForLoopActionUsage

 


if condition

IfActionUsage
ElseAction