Main Content

View Requirements Toolbox Links Associated with Model Elements

You can work with links that were added to the model with Requirements Toolbox™ when you use the Requirements Viewer app in Simulink®. For all links, you can:

  • Highlight model objects with links

  • View information about a link

  • Filter link highlighting based on specified keywords

For links to requirements that are stored in external documents, you can also navigate to the linked requirements.

Highlight, Filter, and View Information for Links in a Model

This example shows how to work with a Simulink model that has links using the Requirements Viewer app. You can highlight links, view information about a link, and filter link highlighting based on specified keywords.

Open the slvnvdemo_fuelsys_officereq model.

open_system('slvnvdemo_fuelsys_officereq')

In the Apps tab, click Requirements Viewer.

Highlight Links in a Model

To highlight model objects that have associated outgoing links, in the Requirements Viewer tab, click Highlight Links.

Model objects that have associated outgoing links are highlighted in yellow, such as the block called MAP sensor.

highlighted_sub_and_block.png

Objects that contain child objects with associated outgoing links are highlighted with an orange outline, such as the fuel rate controller subsystem.

highlighted_subsystem.png

Model objects that do not have associated links are dimmed.

dimmed_highlighting.png

To remove highlighting, click the Highlight Links button again. When highlighting links, ensure that you don't have any keyword filters applied because this can prevent some objects from becoming highlighted. For more information, see Filter Highlighted Links.

View Information About a Link

After you've identified the model objects that have associated outgoing links, you can view information about those links. Right-click the MAP sensor block and select Requirements > Open Outgoing Links dialog.

outgoing_links_dialog.png

The Outgoing Links dialog box displays information about the link and its destination. In this case, the link destination is a requirement stored in an external document. The dialog box displays the:

  • Link description

  • Document type

  • Document name and relative location

  • Location identifier for link destination

  • Link keywords

If you do not have Requirements Toolbox™ installed, the buttons on the Outgoing Links dialog box are dimmed.

Filter Highlighted Links

Links in your model can have associated keywords. You can categorize a link with a keyword. For example, the slvnvdemo_fuelsys_officereq model uses the keywords design, requirement, and test.

In the slvnvdemo_fuelsys_officereq model, the MAP sensor block has the specified keyword test, which was found in View Information about a Link. Filter the highlighted links so that only blocks that have associated links with the keyword test are highlighted:

  1. In the Requirements Viewer tab, click Link Settings.

  2. In the Requirement Settings dialog box, in the Filters tab, select Filter links by keywords when highlighting and reporting requirements.

  3. In the Include links with any of these keywords field, enter test.

  4. Click Close.

  5. In the Requirements Viewer tab, click Highlight Links.

Note that the fuel rate controller subsystem is not highlighted when the filter is applied.

filtered_links.png

You can also use the Exclude links with any of these keywords field to omit blocks from highlighting that have associated links with the specified keyword. You can enter multiple keywords in the Include links with any of these keywords and Exclude links with any of these keywords fields. If you select Apply same filters to link labels, when you right-click blocks that have links but are not highlighted, the link is grayed out and you cannot navigate to the destination.

To clear the filter, clear Filter links by keywords when highlighting and reporting requirements, or remove all keywords from the Include links with any of these keywords and Exclude links with any of these keywords fields.

Navigate to Externally Stored Requirements from a Model

This example shows how to navigate to linked requirements that are stored in an external document from a model using the Requirements Viewer app in Simulink®. If a model object is linked to a requirement that is stored in an external document, such as a Microsoft® Word or Microsoft Excel® file, or an IBM® Rational® DOORS® or IBM DOORS Next project, then you can navigate to the requirement in the external document from the associated block in Simulink.

Open the slvnvdemo_fuelsys_officereq model.

open_system('slvnvdemo_fuelsys_officereq')

The block called MAP sensor is linked to a requirement in a Microsoft Excel file. To navigate to the requirement in the Excel file, right-click the MAP sensor block, select Requirements, and click the link at the top of the context menu.

navigate_req.png

The associated requirement opens in Excel.

linked_req.png

If you don't have Requirements Toolbox™ installed, then you cannot navigate to requirements that are stored in a Requirements Toolbox requirement set.

Close the open models without saving changes.

bdclose all;

See Also