MagicDraw 18.5 Documentation

Skip to end of metadata
Go to start of metadata



Diagram aspects allows you to create the different views, e.g. electrical, mechanical, optical, for the same system structure.The aspects functionality is driven by stereotypes, which allows you to use predefined aspects (only included in SysML Plugin or other customizations) or custom aspects for diagrams. This enables you to:

  • Set any number of aspects for one diagram.
  • Drill down navigation from the Part shape to its internal structure.
  • Create an Aspect diagram directly from the Part shape.
  • Display parts and ports according to aspects.
  • Use aspects with multiple layout templates.

The figure below demonstrates the usage of predefined diagram aspects. Three SysML Internal Block Diagrams of the same Climate Control Hardware system are of different aspects: electrical and communication. The Internal Block Diagram with the electrical aspect shows only the electrical structure of Climate Control Hardware system. Correspondingly, the IBD with the communication aspect shows only the communication structure.

The Climate Control Hardware views through different aspects. The illustration displays concepts from SysML Plugin.


The main workflow to start using the diagrams aspect functionality in your model is the following.

To use diagram aspects


  1. Create new project or open existing
  2. Enable diagrams aspect option. Enabling or disabling diagram aspects option>>
  3. Make sure if predefined aspects is enough for you. Finding predefined diagram aspects>>
  4. If predefined aspects is not what you expect, create our own aspect that you can apply for a diagram. Creating custom aspects>>
  5. Create new aspect diagram:
    - by creating a new diagram with already applied aspect: Creating an aspect diagram>>
    - by applying predefined (#3) or custom aspects (step #4) for an existing diagram. Applying or removing aspect for preexisting diagrams>>
  6. After your model contains diagrams with defined aspects, you can display parts and ports according to aspects
    and navigate among aspect diagrams.

Enabling/disabling diagram aspects option

The Use Aspects option allows you to use definable diagram aspects in your project. By default, its value is false in the Project Options dialog. The procedures below describe how to enable/disable the diagram aspects option in your project.

To enable/disable the diagram aspects option in your project


  1. From the main menu, select Options > Project.
  2. In the Project Options dialog, expand the General property group, and select the Diagram Aspects.
  3. On the right side of the Project Options dialog, set the Use Aspects option value to true to enable the functionality, false - to disable it.
  4. Click OK.

After enabling the diagram aspect functionality, you are able to create new aspect diagrams, and apply aspects for preexisting diagrams. The following procedures describe how to perform these functions

Specifying/removing ignored aspects

All of the available aspects are visible when trying:

If you have many diagram aspects defined, but you need to use only a few of them in your project, you can restrict the visibility of any unnecessary aspects in your project. The procedure below describes how to specify/remove ignored aspects.

To specify/remove ignored aspects in your project


  1. From the main menu, select Options > Project.
  2. In the Project Options dialog, expand the General property group, and select the Diagram Aspects.
  3. On the right side of the Project Options dialog, select the Ignored Aspect option value.
  4. Click the Edit button.
  5. In the Select Stereotype dialog, select aspects that you do not want to use in your project. If you want to use them in your project again, remove them from this list by double-clicking on the aspect in the Selected elements area. Click OK.

    Information

    If you have SysML Plugin installed, you can see predefined aspects in the List tab by clearing the Apply Filter check box in the Select Stereotype dialog.

  6. Click OK.

All aspects added into Ignored Aspect option value are no longer visible when trying to create a new aspect diagram or to apply it to a pre-existing diagram. To see them again in the model, you must remove them from the Ignored Aspect option value.

Finding predefined diagram aspects (only with SysML Plugin)

There are predefined aspects that are only included in SysML Plugin or other customizations. The predefined diagram aspects are the following: <<optical>>, <<mechanical>>, <<electrical>>, <<software>>, <<conceptual>>, and <<logical>>. The procedure below explains how to find them in your project.


To find predefined aspects in the project when SysML Plugin is installed


  1. In the Containment tree, click , and select the Show Auxiliary Resources option.
  2. Expand packages MD Customization for SysML > additional_stereotypes > aspects.
The location of the predefined diagram aspects in the project when SysML plugin is installed. The illustration displays concepts from SysML Plugin.

You can use predefined aspects in your project, or you can create custom aspects. The following procedure describes how to create custom aspects.


Back to Top

Creating custom aspects

You can define your own diagram aspects that you want to use in the project. You can create custom aspects in the same way you create a new stereotype. The procedures below describe how to create a custom diagram aspect, e.g., Air, in two different ways:

Creating an aspect on the Profile Diagram pane

To create a new aspect on the Profile Diagram pane


  1. Open or create the Profile Diagram.
  2. On the diagram palette, click the Stereotype button, place it on the diagram pane, and type its name, e.g., Air.
  3. In the Containment tree, click , and select the Show Auxiliary Resources option.
  4. Expand packages UML Standard Profile > MagicDraw Profile, and drag the aspect Stereotype on the same diagram pane.
  5. Create the Generalization relationship from the newly created Stereotype to the aspect Stereotype.
    The new aspect is created, and can be used in the project.

The creation of the new diagram aspect on the Profile Diagram pane.

Creating an aspect in the Containment tree

To create a new aspect in the Containment tree


  1. In the Containment tree, select either a Profile or Package.
  2. From its shortcut menu, click the Create Element button.
  3. In the Create Element dialog, select Stereotype, and type its name, e.g., Air.
  4. Open its Specification window, select the All properties mode, and find the Base Classifier property.
  5. Select the value cell of the Base Classifier property, click the Edit button.
  6. In the Select Stereotype dialog, clear the Apply Filter check box.
  7. In the Tree tab, expand packages UML Standard Profile > MagicDraw Profile, and double click to select the aspect Stereotype.
  8. Click OK and Close.
    The new aspect is created, and can be used in the project.

    The creation of the new diagram aspect in the Containment tree.

After the custom stereotype is created in the model, the Composite Structure diagram with the custom aspect applied can be found in the Create Diagram dialog under the Aspect Diagrams group when creating a new aspect diagram. The procedure below describes how to create a new aspect diagram.


Back to Top

Creating an aspect diagram

Before creating an aspect diagram, the following conditions must be met:


Creating a new aspect diagram is similar to creating any other diagram. Every way to create a diagram is described here: Creating diagrams. The difference is that aspect Composite Structure diagrams are automatically collected under the separate Aspect Diagrams group of the Create Diagram dialog. If you have SysML plugin installed, the Internal Block diagrams with custom and predefined aspects are collected under the same Aspect Diagrams group.

The Aspect Diagram group, highlighted in orange, with predefined and custom UML and SysML aspect diagrams. The illustration displays concepts from SysML Plugin.


Back to Top

Applying/removing aspect for preexisting diagrams

You can apply custom or predefined aspects for preexisting diagrams. It is possible to apply multiple aspects for one diagram. The aspects can be applied for all diagrams except Activity, State Machine, and Sequence diagrams. The procedure below describes how to apply/remove an aspect for a diagram.


To apply/remove an aspect for a diagram


  • From the diagram shortcut menu, point to Aspect, and choose an appropriate aspect from the list.

Applying an aspect for a diagram. The illustration displays concepts from SysML Plugin.


Back to Top

How aspects match with parts and ports

The diagram aspects mechanism identifies whether or not the aspect name and name of the stereotypes applied for the parts and ports (or their types) match. The stereotype name must contain a matching aspect name. For example, a diagram aspect name is Electrical, which matches a port stereotype name WElectrical. When these conditions are met, you can display only the Electrical part of your model in the Composite Structure DiagramHow to display parts and port according to aspect >>

If the diagram aspect name doesn't match the name of the part/port stereotype or its type, you can create a custom stereotype with the same name as the aspect's and apply it for parts and ports. Or you can create a custom diagram aspect.


Matching the diagram aspect Electrical with the port stereotype name Electrical.

Back to Top


Navigation among aspect diagrams

When elements have an internal structure, the rake icon appears on the element shape. If those elements belong to an aspect diagram, the rake icon navigates to the same aspect internal structure of the selected element. If there is no internal diagram of the same aspect, then any diagram of another aspect or diagram without aspect is opened.

The figure below demonstrates the electrical Internal Block diagram of the Climate Control Hardware. The rake icon on the part typed by Control System Block indicates that it contains an inner structure. There are four Internal Block diagrams for the Control System in the model. Although, after double-clicking on that part shape typed by Control System Block, the rake icon navigates exactly to the electrical Internal Block diagram of the Control System.

The navigation among aspect diagrams via rake icon. The illustration displays concepts from SysML Plugin.


Back to Top

Displaying parts and ports according to aspects

Before using this feature, make sure:

When displaying Parts/Ports in the aspect diagram, e.g., Electrical Data Transfer System Internal Block Diagram, you can display all the parts/ports of an appropriate aspect, e.g., Electrical, by using the All By Aspect button. This button can be found in the three places mentioned above in this section. After selecting this button, all parts or ports of the same aspect as the diagram's can be displayed. The figure below demonstrates the usage of this button in the Display Parts/Ports dialog when you are trying to display all electrical aspect ports of the selected control Panel part.

The All By Aspect button usage in the Display Parts/Ports dialog. The illustration displays concepts from SysML Plugin.


On this page

Sample Model

The model used in the figures of this page is the Diagram aspects sample models that comes with SysML Plugin. To open this sample properly you need to install the SysML plugin in the MagicDraw and:

  • Download diagram aspects.mdzip.
  • Find in the modeling tool: <modeling tool installation directory>\samples\SysML\diagram aspects.mdzip.