Main Content

Link Directly to Requirements in Microsoft Word Documents

With Requirements Toolbox™, you can create direct links from linkable items such as Simulink® blocks or test cases to requirements in Microsoft® Word. You can create a link to a selection in Microsoft Word, a named bookmark, or a section heading.

Note

  • You can only create direct links to requirements in Microsoft Word on Windows® platforms.

  • MATLAB® Online™ does not support linking to requirements in Microsoft Word documents.

Link Requirements in Microsoft Word to Simulink Blocks

In this example, you link requirements from a document in Microsoft® Word to Simulink® blocks. Open the slvnvdemo_fuelsys_officereq model.

open_system('slvnvdemo_fuelsys_officereq');

Open the slvnvdemo_FuelSys_DesignDescription.docx requirements document from the working directory, or at the MATLAB® command line by entering:

open('slvnvdemo_FuelSys_DesignDescription.docx')

Configure Selection Link Settings

First, ensure that Requirements Toolbox™ can link to Word documents and that bidirectional linking and external connectivity are enabled.

  1. In Simulink, in the Apps tab, click Requirements Manager.

  2. In the Requirements tab, ensure Layout > Requirements Browser is selected.

  3. In the Requirements pane, in the View drop-down menu, select Links.

  4. In the Requirements tab, click Link Settings > Linking Options. The Requirement Settings dialog appears.

  5. Navigate to the Selection Linking tab.

  6. Next to Enabled applications ensure that Word is selected.

  7. In the Document file reference drop-down menu, select filename only (on MATLAB path).

  8. Under When creating selection-based links, ensure that Modify destination for bidirectional linking and Store absolute path to model file are both selected. Make sure that Use ActiveX for incoming links (backward compatibility) is cleared.

  9. Ensure that Enable external connectivity at MATLAB startup is selected.

  10. Click Close.

rmi_dlg_settings.png

Link to a Selection in Microsoft Word

Create a link from the selected text of the Determination of pumping efficiency requirement in Word to the Pumping Constant block:

  1. In the slvnvdemo_FuelSys_DesignDescription Word document, find the section titled 2.2 Determination of pumping efficiency.

  2. Select the header text.

  3. In the slvnvdemo_fuelsys_officereq Simulink model, double-click the fuel rate controller subsystem to open it.

  4. Double-click the Airflow calculation subsystem to open it.

  5. Right-click the Pumping Constant block and click Requirements > Link to Selection in Word. In Word, a bookmark is inserted with an automatically generated name. A link icon (url_nav_control.gif) is also inserted to navigate to the Simulink item associated with this requirement.

  6. Navigate to your requirement in Word by right-clicking the Pumping Constant block, selecting Requirements and clicking the numbered requirement.

  7. Navigate back to your Simulink block by clicking the link icon (url_nav_control.gif) in Word. If you don't want to add this link icon to your Word document when you create the link, clear Modify destination for bidirectional linking in the Requirements Settings window. However, the Word documented is still modified when you create the link with this method because a bookmark is added.

Create a Link to a Bookmark in a Microsoft Word Requirements Document

You can link from Simulink to an existing bookmark in your Word document. In Word, you can create bookmarks to each of your requirements with a meaningful name that represents the requirement content. When you create a link with this method, the requirements Word document is not modified and no Simulink navigation link is added to the Word document.

To add a bookmark to your Microsoft Word document, see Add or delete bookmarks in a Word document or Outlook message on the Microsoft website.

Create a bookmark for the Determination of pumping efficiency requirement in Word, then link the Pumping Constant block to the bookmark:

  1. In the slvnvdemo_FuelSys_DesignDescription.docx Word document, find the section titled 2.2 Determination of pumping efficiency.

  2. Create a bookmark with the name Determination_of_pumping_efficiency.

  3. Save and close the Word document.

  4. In the slvnvdemo_fuelsys_officereq Simulink model, double-click the fuel rate controller subsystem to open it.

  5. Double-click the Airflow calculation subsystem to open it.

  6. Right-click the Pumping Constant block and select Requirements > Open Outgoing Links dialog.

  7. In the Outgoing Links dialog, click New.

  8. From the Document type drop-down, select Microsoft Word.

  9. Next to the Document field, click Browse and select slvnvdemo_FuelSys_DesignDescription.docx. Click Open.

  10. Select the Document Index tab. Scroll down to the bookmarks section and select the Determination_of_pumping_efficiency bookmark. If your bookmark does not appear, click Refresh. Click Apply and then click OK to create the link.

outgoing_links_bkmk.png

You can navigate to your requirement in Word by right-clicking the Pumping Constant block, selecting Requirements, and clicking the numbered requirement with the text Determination_of_pumping_efficiency in slvnvdemo_FuelSys_DesignDescription.docx.

Create a Link to a Heading in a Microsoft Word Requirements Document

You can create headings and subheadings in Microsoft Word, then link Simulink blocks to these headings. Similar to creating a link to a bookmark, creating a link to a heading allows you to give a link a meaningful name. If your requirements Word document already has section headings, then creating a link with this method does not modify the requirements document. However, you cannot navigate between Simulink and Word when you link to a heading.

If your Word document does not already have headings, see Add a heading on the Microsoft website.

The slvnvdemo_FuelSys_DesignDescription.docx Word document already has headings for all of the requirements. Create a link from the Determination of pumping efficiency requirement in Word to the Pumping Constant block:

  1. Close the slvnvdemo_FuelSys_DesignDescription.docx requirements Word document.

  2. In the slvnvdemo_fuelsys_officereq Simulink model, double-click the fuel rate controller subsystem to open it.

  3. Double-click the Airflow calculation subsystem to open it.

  4. Right-click the Pumping Constant block and select Requirements > Open Outgoing Links dialog.

  5. In the Outgoing Links dialog, click New.

  6. From the Document type drop-down, select Microsoft Word.

  7. Next to the Document field, click Browse and select slvnvdemo_FuelSys_DesignDescription.docx. Click Open.

  8. Select the Document Index tab. Under Outline Headings, select 2.2 Determination of pumping efficiency. Click Apply and then click OK to create the link.

  9. Navigate to your requirement in Word by right-clicking the Pumping Constant block, selecting Requirements, and clicking the numbered requirement with the text 2.2 Determination of pumping efficiency in slvnvdemo_FuelSys_DesignDescription.docx.

Related Topics