Main Content

How to Include Linked Requirements Details in Generated Report

The requirements report is a feature in RMI that scans the Simulink® model for links to external requirements documents and generates a report. When documents are available for reading during requirements report generation, you have an option to insert referenced document fragments into the generated content to produce a more detailed report.

Open Example Model and Load RMI Links Data.

This example uses the Power Window Controller model and relies on an externally stored set of links.

Run the following commands to enable externally stored links, associate the example model with externally stored RMI data, and open the Simulink model.

rmipref('StoreDataExternally', true);
rmimap.map('slvnvdemo_powerwindowController', 'slvnvdemo_powerwindowOffice.slmx');
Mapping .../slvnvdemo_powerwindowController.slx to .../slvnvdemo_powerwindowOffice.slmx
open_system('slvnvdemo_powerwindowController');

Navigate Links to See Target Content in Documents

Highlight links in the model to locate objects with links and navigate to documents. In the Apps tab open the Requirements Manager. In the Requirements tab, click Highlight Links. Alternatively, evaluate the following code.

rmi('highlightModel', 'slvnvdemo_powerwindowController');

The included links demonstrate several possible styles of linking with Microsoft® Office documents:

  • The control subsystem links to a major subheader in the Word document. Evaluate the code to navigate to the control subsystem.

rmidemo_callback('locate','slvnvdemo_powerwindowController/control');
  • Both truth tables link to a subheader and a table. Evaluate the code to navigate to the Truth Table and Truth Table1 blocks.

rmidemo_callback('locate',{'slvnvdemo_powerwindowController/Truth Table', ...
    'slvnvdemo_powerwindowController/Truth Table1'});
  • Driver-side Mux1 links to a subheader including some bullet points. Evaluate the code to navigate to the Mux1 block.

rmidemo_callback('locate','slvnvdemo_powerwindowController/Mux1');
  • Passenger-side Mux4 links to just a subheader. Evaluate the code to navigate to the Mux4 block.

rmidemo_callback('locate','slvnvdemo_powerwindowController/Mux4');

Requirements Report Without Document Fragments

  • In the Simulink model, in the Requirements tab, click Share > Report Options.

  • Uncheck Include details from linked documents in the Report tab of Requirements Settings dialog.

PowerWindow_settingsDetailsOff.png

  • In the Simulink model in the Requirements tab, click Share > Generate Model Traceability Report.

  • Note that the tables in the report include only short labels of links. These are the same string labels you see in the object context menus and in the Link Editor dialog box.

PowerWindow_RptDetailsNone.png

Requirements Report with Documents Content Inserted

  • In the Simulink model in the Requirements tab, click Share > Report Options.

  • This time, check Include details from linked documents.

  • Re-generate the report by clicking Share > Generate Model Traceability Report.

  • When the target range in a Microsoft Word document includes a table, the table is now included in generated report.

PowerWindow_RptDetailsWordTable.png

  • When the target location in Microsoft Word is a subheader, child content is included in generated report. Use this feature with caution: linking to a major subheader in the document could mean large amounts of text are copied from the document into the report.

  • When the target location is a range of cells in Microsoft Excel, the target worksheet fragment is inserted in the report.

  • When the target location is a single cell in Microsoft Excel worksheet, the content of cells to the right of the target cell is also inserted into the report.

Include IBM DOORS Attributes in RMI Report

For users linking with IBM® DOORS®, RMI provides more control over which object attributes to include in the requirements tables.

  • The default configuration will include DOORS Object Heading, DOORS Object Text and all other attributes except: "Created Thru", all attributes with empty string values, and system attributes that are false.

  • The list of attribute names to include in generated report is stored as part of RMI settings under user prefdir.

  • Use the RptgenRMI.doorsAttribs to include/exclude certain attributes and/or groups of attributes.

current_settings = RptgenRMI.doorsAttribs('show')
current_settings = 5x1 cell
    {'Object Heading' }
    {'Object Text'    }
    {'$AllAttributes$'}
    {'$NonEmpty$'     }
    {'-Created Thru'  }