Page tree

MagicDraw 2021x Documentation


On this page


Diagrams showing multiple aspects of the system are often difficult to understand and analyze since they are quite crowded. Filtering diagrams by Legend items enables users to reduce diagrams to the chosen views only, i.e., hide unnecessary layers in order to make them more comprehensible. The feature is especially useful when there is a need to present to stakeholders only one  (e.g., electrical) or a few aspects displayed in the diagram.

Filtering a diagram by the selected Legend item.

Filtering diagram by Legend items

Once you have created or automatically extracted a Legend and specified Legend items for it, you can filter your diagram by Legend items to highlight the chosen layers.

You can filter the diagram directly from:

Filtering when Legend shape is displayed 

If the Legend shape is displayed on the diagram pane, you can filter your diagram by Legend items directly from it. To be more specific, you can either filter your diagram from the smart manipulator toolbar of the Legend shape or the selected Legend item(s) shortcut menuThe latter method comes in handy when there is a need to filter the diagram by multiple Legend items at once. 


Filtering by Legend items from the smart manipulator toolbar


To filter a diagram by the selected Legend item


  1. Open a diagram you want to filter.
  2. In the Legend shape on the diagram pane, select a Legend item to filter your diagram by. 
  3. In the smart manipulator toolbar, click .

    The diagram is filtered by the selected Legend item, meaning that the diagram is limited to one specific aspect. Other Legend items in the Legend shape are greyed out. 

    Tip

    To filter the diagram by multiple Legend items, repeat the procedure.


To filter a diagram by all Legend items at once


  1. Select a Legend shape on the diagram pane.
  2. In the smart manipulator toolbar, click.

The diagram is filtered by all items specified in the Legend, meaning that all diagram aspects are displayed. 


Filtering by Legend items from the shortcut menu


To filter a diagram by the selected Legend items from the shortcut menu


  1. In the Legend shape on a diagram, select the Legend item(s) to filter your diagram by.
  2. Right-click and then in the shortcut menu, select Filtered

Comments and notes are left attached to the element symbols that are visible in the diagram after applying the filter.


Filtering when Legend shape is not displayed 

Alternatively, you can filter your diagram by the selected Legend items directly from the diagram toolbar. This is the primary filtering method when the Legend shape is not displayed on the diagram. In this case, you can select whether to filter the diagram by a single or multiple Legend items as well.


Filtering by Legend items from the diagram toolbar


To filter a diagram by the selected Legend item(s)


  1. Open a diagram you want to filter.
  2. In the diagram toolbar, click  > Filter by Legend Items.

  3. In the open dialog, select the Legend items to filter your diagram by.

  4. Click Filter when you are done. 

Managing and removing applied filter

Once diagram layers are filtered, the following notification appears above the diagram:

  • Click Clear to clear the applied filter. 

  • Click Save to keep the filter applied after the diagram is reloaded. 

Alternatively, to clear the applied filter, you can:

  • clickin the smart manipulator toolbar of the selected Legend item.

  • uncheck the box next to Filtered in the Legend item shortcut menu.

  • clear the corresponding boxes in the Filter by Legend Items ( > Filter by Legend Items) dialog.

The diagram filtered by Legend items is read-only, meaning that it cannot be edited unless the filter is removed.

Sample model

The model used in the figures on this page is the Layers sample model that comes with the SysML plugin. To open this model, do one of the following:

  • Download layers.mdzip
  • Open the model from the <modeling tool installation directory>\samples\SysML directory.
  • No labels