The compartment is an area on or next to the shape used to display component properties. As an example, please see the figure below.

The parts, values, and proxy ports compartments are shown on the Water Heating Element Block shape.


The Compartment Editor allows you to display compartments and their properties on the Block:

  • constraints
  • flow properties
  • parts
  • properties (formerly :UML properties)
  • references
  • values
  • full ports
  • proxy ports
  • parameters

The following table explains which elements are displayed on a selected shape to show the additional information.

SysML specific compartments

Displayed Elements
constraints

Constraints and Constraint Properties.

Constraint Properties: properties typed by Constraint Blocks, or subtypes of Constraint Blocks, always having the ‘composite’ aggregation kind.

flow propertiesFlow Properties: properties that apply the «FlowProperty» stereotype.
partsPart Properties: properties typed by Blocks or subtypes of Blocks.
properties

All other properties that cannot be classified into the previous compartments.

references

Shared Properties and Reference Properties: properties typed by Blocks or subtypes of Blocks (except Constraint Block) having ‘shared’ and ‘none’ aggregation kind, respectively. There is no distinction between Shared Property and Reference Property.

values

Value Properties: properties typed by Value Types or subtypes of Value Types, always having the ‘composite’ aggregation kind.

full ports

The port is stereotyped by FullPort.

proxy ports

The port stereotyped by ProxyPort.

parametersConstraint Parameters.

The following sections outline the main procedures for working with the compartment area:

Creating elements in compartments


To quickly create elements in compartments on shapes, do one of the following
  • On the diagram, select a shape and click the Create Element smart manipulator. Then in the menu, select the element that you want to create.
  • On the diagram, select a shape. Then next to the particular compartment, click the Create <element name> smart manipulator.

 

Displaying and suppressing compartments


To display or suppress compartments, do one of the following
  • On the diagram, click the shape and click the Compartments smart manipulator. Then select or or cancel the selection of the particular compartment, for example, Attributes, Operations.

    The Compartments smart manipulator exists on shapes that have the compartment boxes. For example, pins, initial nodes do not have the Compartments smart manipulator.

  • On the diagram, select a shape and click the Suppress <compartment name> smart manipulator. 
  • On the diagram, right-click the shape and select Symbol Properties. Then select or cancel the selection of the Suppress <compartment name> check box.

 

Customizing compartments


Use the Compartment Edit dialog to control the list of elements and properties visible in compartments on shapes. You can display or hide stereotypes, constraints, tagged values, attributes, operations, and others. If there are hidden properties on the boxable compartment, the ... is displayed.

You can also display or hide the element specification properties, such as Name, Is Active, Owner, To Do in the Compartment Edit dialog under the Element Properties tab.

 

To open the Compartment Edit dialog from the diagram pane


  • Select shape and click the Compartments smart manipulator. On the menu, click the arrow to expand and then select Edit Compartments.
  • Right-click a single or any number of shapes or classifier compartments (e.g. Properties, Operations, Receptions, Ports, and etc.) and from the shortcut menu, select Edit Compartments.

    Compartment Edit dialog of multiple shapes

    When you edit compartments of more than one shape at once, the Compartment Edit dialog works with the following rules:

     - If you select multiple shapes of the same element, the Compartment Edit dialog is the same as for a single shape, but changes are applied for all selected shapes after clicking OK.
     - If you select multiple shapes of different elements, the Compartment Edit dialog shows a union of compartments and their items.
     - If you select multiple shapes but at least one of them hides the common compartment item while another shows it, the Compartment Edit dialog displays that item in italics in the Element Properties tab > Selected area. If you move the conflicting item to the Hidden area, it becomes non-italicized and changes are applied for both shapes after clicking OK.

  • On the Note shape, click the Edit Element Properties smart manipulator.

 


For example, the following procedure shows how to customize the compartments of a part.


To customize a compartment of a Part Property


  1. Right-click a Part Property shape and from the shortcut menu, select the Edit Compartment button.
  2. In the Compartment Edit dialog, select a compartment tab which you want to customize.
  3. Double-click an element or use the arrow buttons to move an element from the Hidden to the Selected area to display the element.
  4. Click OK when done.
The air and is properties are displayed on the r part shape by using the Compartment Edit dialog. The image is from the TemperatureRegulationLoop.mdzip sample model. Find it in modeling tool <modeling tool installation directory>\samples\SysML.