Setting up default view options and compartments for new SysML diagrams (SysML)
You can define default view options and compartments for new SysML diagrams by applying the «DiagramDefaults» stereotype to a diagram that defines the default view options and compartments you want to use.
For example, If we create a Block Definition Diagram named Abstract BDD, set up its default view options and compartments through the Default View Options (Profile) command, and then apply the «DiagramDefaults» stereotype to that diagram; next time we create a Block Definition Diagram in the model, the default view options and compartments of that diagram will be copied from the Abstract BDD diagram.
There are two approaches you can take:
• After defining default view options and compartments for a diagram, you can apply the «DiagramDefaults» stereotype to that diagram so that the default view options and compartments you set up are used for new diagrams of the same type.
• You can create abstract diagrams whose only purpose is to define the default view options and compartments for new diagrams of that type.
If you want to create an abstract diagram that uses the default view options and compartments that have been defined for a diagram in the model, you can clone that diagram, remove all the symbols from the clone's diagram, and apply the «DiagramDefaults» stereotype to that clone.
To use an existing diagram to define default view options and compartments for new diagrams:
1. Locate the diagram that you want to use to set up the default view options and compartments of new diagrams of the same type.
2. Right-click the diagram, point to Links > Stereotypes, and then click DiagramDefault.
To create an abstract diagram to define default view options and compartments for new diagrams:
1. Create a diagram of the appropriate type.
You may want to group all the abstract diagrams in the same Package.
2. Right-click the diagram you created, and then clickOpen.
3. Right-click the background of the diagram, and then click Default View Options (Profile).
Modeler opens the Diagram/Default View Options dialog.
4. For each symbol type you want to set up:
a. In the left pane, select the symbol you want to set up.
b. On the Options tab, set up the view options for the symbol as required.
c. On the Compartments tab, select the check boxes associated with the compartments you want to show for the symbol.
To find diagrams that define default view options and compartments:
1. From the Dictionary pane, expand the UML folder, expand the Stereotypes folder, and then locate the «DiagramDefault» stereotype.
2. Right-click the «DiagramDefault» stereotype, point to Report, and then click Usage.
3. diagrams that are stereotyped by the «DiagramDefault» stereotype (those diagrams that define default view options and compartments) are listed in the Results pane.