Diagram Relation Matrix
The Diagram Relation Matrix View presents the contents of the current diagram in the form of a simple grid, identifying the relationships between the named elements on that diagram. Objects that have an empty name field are not included in the matrix.
Design > Diagram > Views > Relation Matrix View
Right-click on diagram background | Switch View | Switch to Relation Matrix View or
Right-click on diagram tab | Switch to Relation Matrix View
In the Browser window, right-click on the name of the open diagram | Switch View | Switch to Relation Matrix View
The Relation Matrix View
The Relation Matrix view is similar to the project-level Relationship Matrix, but it is a diagram view and as such displays only those elements contained in the selected diagram and has fewer fields to define where those relationships are detected.
Each row and each column of the Relation Matrix view represents a diagram element. There is small italic number on the top-left corner of each row and column cell, which is the row/column index. The cell at the intersection of a row and a column shows the details of any relationships between the corresponding diagram elements.
The Relation Matrix view provides a means to quickly identify elements that are not yet connected to other elements, such as Requirements elements that are not yet realized. You can also create new relationships or delete existing relationships directly in the matrix.
Selecting a cell in the matrix shows additional relationship properties where they exist, such as cardinality values and roles. Where relationships exist between features of the source and target elements, this is represented on the matrix as well.
You can refine the display to show only:
- Relationship connectors of a specific type
- Source elements of a specific type and/or
- Target elements of a specific type
Click on the drop-down arrow for the appropriate field at the top of the matrix, and select the required type. Note that the element and connector types in the lists are only for those objects that are already in the diagram.
You can further restrict the display to show only elements that already have connectors, by selecting the 'Limit to Connected Elements' checkbox.
By default, the Relation Matrix View displays elements in a hierarchy, as for Requirement A1 in the earlier example. You can change this to display the elements in flat lists by right-clicking in the top left cell and deselecting the 'Show Element Hierarchy' option.
Navigate the Relation Matrix
You can navigate through the Relation Matrix using either the scroll bars or the arrow keys.
- If the matrix is bigger than the display area of the screen, and some of the element/relation cells cannot be seen, a vertical and/or a horizontal scroll bar is displayed so that you can scroll to the hidden area of the matrix
- If you scroll the matrix up, the column headers remain visible whilst the rows appear to roll beneath them and are hidden; in this case, the top edge of the first visible row header becomes a dashed line to indicate there are hidden rows above it (and you will notice that the italic number in the top left corner of the cell will be a number greater than 1)
- Similarly, if you scroll the matrix left, the row headers remain visible while the columns appear to roll beneath them and are hidden; the left edge of the first visible column header becomes a dashed line to indicate there are hidden columns to the left of it (and the italic number in the top left corner of the cell will be a number greater than 1)
- From a selected cell of the matrix, you can press the arrow keys to move to a neighboring cell of the same type (that is, column header to column header, row header to row header or grid cell to grid cell)
- To move between cells of different types, such as from a grid cell to a column header cell or vice versa, press as you press the arrow keys
- If the neighboring cell is hidden or outside the display area, pressing the appropriate arrow key will scroll the Relation Matrix to show the row or column containing that cell
Add / Delete Element
You can add elements to the Relation Matrix by:
- Dragging the appropriate element icon from the Toolbox onto the 'Target' triangle or 'Source' triangle (to add a peer element) or onto an element in the Target row or Source column (to add the new element as a child of the selected element)
- Dragging an element from the Browser window on to the Target row or Source column
- Right-clicking on an element name in the Target row or Source column, and selecting the 'New Child Element' option to add a new child element of a type listed in the submenu
- Right-clicking on an element name in the Target row or Source column, and selecting the 'Insert Related Elements...' option to insert a related element of the selected element, using the Insert Related Elements dialog
- Right-clicking on the diagram background outside the Relation Matrix and choosing the 'Insert Other Element...' option to insert an element from any Package, located and selected using the 'Select Element' browser
You can delete an element from Relation Matrix by selecting the element-name cell and either:
- Pressing , which deletes the element and its connectors from the model; you are prompted to confirm the deletion, or
- Right-clicking on the cell and selecting the 'Delete <element name>' option (the element is immediately removed from the matrix and diagram), or
- Pressing the
Add / Delete Connector
The Diagram Relation Matrix greatly simplifies the process of creating and removing relationship connectors between elements.
To add a connector, click on the cell at the intersection of the source element row and target element column and:
- Right-click and select the 'Create new relationship' option, and then select the type of connector from the sub-menu, or
- If there is currently no connector between the source and target element, press the and then select the type of connector from the submenu, or
- If there is a connector and you want to add another one, press the Spacebar, select the 'Create new relationship' option and then select the type of connector from the submenu
To delete a connector:
Click on the cell containing the connector to delete, and either:
- Press , which prompts you to confirm the action before deleting the connector from model, or
- Right-click and select the 'Delete Connector' option, which prompts you to specify whether to simply hide the connector or to delete the connector from the model, or
- Press the Delete Key, which again prompts you to select between hiding and deleting the connector
Display Element / Connector Properties
You can display the properties of any element or a connector in the matrix, either in the object's 'Properties' dialog or in the docked Properties window.
- To display the 'Properties' dialog, double-click on the name of the element or connector in a cell
- To display the docked Properties window, click on the name of the element or connector in a cell and press ; if the window is already displayed, simply click on the element or connector name to make it the focus of the window
Certain features are shown on the cell itself. For example, the cell for an Information Flow on a SysML diagram also shows the conveyed items. You can locate the conveyed items in the Browser window by right-clicking on the name and selecting the 'Find Conveyed Items' option.
In-Place Editing Element Names
If you should need to correct the name of an element in the Relation Matrix, you can easily do so using the in-place editor; click on the element cell and either pressor click on the element name twice (not double click). Type in the correct text and press the .
If you want to simplify your diagram and its various representations, you can hide connectors that are not immediately relevant to the view, and recall them when your purpose requires them. Hiding or showing a connector in one view of the diagram affects all the other views.
Before attempting to hide connectors, make sure the 'Prompt on connector deletes' checkbox is selected in the 'Links' page of the 'Preferences' dialog ('Start > Appearance > Preferences > Preferences > Links').
To hide a connector:
Click on the cell showing the connector you want to hide, then either:
- Right-click and select the 'Visibility | Hide Connector' option, or
- Right-click and select the 'Delete Connector' option, then on the 'Remove Connector' dialog select the 'Hide the connector' radio button and click on the , or
- Press the , and again on the 'Remove Connector' dialog select the 'Hide the connector' radio button and click on the OK button,
To show a hidden connector:
Click on the cell containing the connector you want to reveal, then:
- Right-click and, if the cell does contain any hidden connectors, click on the option 'Show Relation' (the option is not provided if there are no hidden connectors)
- From the sub-menu listing all the hidden connectors by type and (if set) name, select the connector to show
Navigate between Graphical view and Relation Matrix view
You can easily switch from the Relation Matrix View to the graphical representation or any of the other diagram views, using the right-click context menu option 'Switch View | Switch to Graphical View' (or 'Switch to <other> View').
If you select the option after clicking on a:
- General area of the matrix, the diagram displays from the top left corner, and other views display from the starting point
- Relation cell that shows a specific connector, the diagram or other view displays with that connector or its information visible and selected
If you are in the diagram in its graphical view, you can select a connector and specifically focus on it in the Diagram Relation Matrix, by right-clicking on the selected connector and clicking on the 'Switch to Relation Matrix View' option. The matrix displays with the cell for that connector in the center of the display.
Publish the Relation Matrix
When you render the diagram as a Relation Matrix, you can capture the appearance of the matrix in a:
- Printed hard copy - 'Publish > Diagram Image > Print > Print'
- PDF file - 'Publish > Diagram Image > Print > Print to PDF
- Image file - 'Publish > Diagram Image > Save > Save to File
- Clipboard capture - 'Publish > Diagram Image > Save > Save to Clipboard