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.
In Simulink, in the Apps tab, click Requirements Manager.
In the Requirements tab, ensure Layout > Requirements Browser is selected.
In the Requirements pane, in the View drop-down menu, select
Links
.In the Requirements tab, click Link Settings > Linking Options. The Requirement Settings dialog appears.
Navigate to the Selection Linking tab.
Next to Enabled applications ensure that Word is selected.
In the Document file reference drop-down menu, select
filename only (on MATLAB path)
.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.
Ensure that Enable external connectivity at MATLAB startup is selected.
Click Close.
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:
In the
slvnvdemo_FuelSys_DesignDescription
Word document, find the section titled2.2 Determination of pumping efficiency
.Select the header text.
In the
slvnvdemo_fuelsys_officereq
Simulink model, double-click thefuel rate controller
subsystem to open it.Double-click the
Airflow calculation
subsystem to open it.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 () is also inserted to navigate to the Simulink item associated with this requirement.Navigate to your requirement in Word by right-clicking the
Pumping Constant
block, selecting Requirements and clicking the numbered requirement.Navigate back to your Simulink block by clicking the link icon () 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:
In the
slvnvdemo_FuelSys_DesignDescription.docx
Word document, find the section titled2.2 Determination of pumping efficiency
.Create a bookmark with the name
Determination_of_pumping_efficiency
.Save and close the Word document.
In the
slvnvdemo_fuelsys_officereq
Simulink model, double-click thefuel rate controller
subsystem to open it.Double-click the
Airflow calculation
subsystem to open it.Right-click the
Pumping Constant
block and select Requirements > Open Outgoing Links dialog.In the Outgoing Links dialog, click New.
From the Document type drop-down, select
Microsoft Word
.Next to the Document field, click Browse and select
slvnvdemo_FuelSys_DesignDescription.docx
. Click Open.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.
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:
Close the
slvnvdemo_FuelSys_DesignDescription.docx
requirements Word document.In the
slvnvdemo_fuelsys_officereq
Simulink model, double-click thefuel rate controller
subsystem to open it.Double-click the
Airflow calculation
subsystem to open it.Right-click the
Pumping Constant
block and select Requirements > Open Outgoing Links dialog.In the Outgoing Links dialog, click New.
From the Document type drop-down, select
Microsoft Word
.Next to the Document field, click Browse and select
slvnvdemo_FuelSys_DesignDescription.docx
. Click Open.Select the Document Index tab. Under
Outline Headings
, select2.2 Determination of pumping efficiency
. Click Apply and then click OK to create the link.Navigate to your requirement in Word by right-clicking the
Pumping Constant
block, selecting Requirements, and clicking the numbered requirement with the text 2.2Determination of pumping efficiency in slvnvdemo_FuelSys_DesignDescription.docx
.