Skip to Main Content Skip to Search
Product Documentation

iec.ExportTraceReport - Generate XLS file that contains traceability matrix

Syntax

iec.ExportTraceReport('model_name')
iec.ExportTraceReport('model_name', 'file_name')
iec.ExportTraceReport('model_name', 'file_name', 'path')

Description

iec.ExportTraceReport('model_name') generates an XLS file that contains a Traceability Matrix. model_name is the name of the model.

iec.ExportTraceReport('model_name', 'file_name') generates an XLS file that contains a Traceability Matrix. file_name is a string that specifies the name of the file. The first time that you call iec.ExportTraceReport, file_name is optional. If you do not provide file_name, the function names the file using the following convention. modelUpdate is the date and time that you last updated the model:

model_name_Trace_modelUpdate.xls

To regenerate the traceability matrix, you must specify file_name.

iec.ExportTraceReport('model_name', 'file_name', 'path') generates an XLS file that contains a Traceability Matrix. path is an optional string that specifies the full path to the location where you want the software to save the file.

Tips

For more information, see Prerequisites for Generating a Traceability Matrix.

Definitions

Traceability Matrix

A traceability matrix provides traceability among model objects, generated code, and model requirements. You can add comments to the generated traceability matrix. If you change the model and regenerate the traceability matrix, the software retains your comments.

Examples

Generate a traceability matrix with traceability between model objects and generated code for the rtwdemo_hyperlinks model:

% Open the model.
open_system('rtwdemo_hyperlinks');
% Generate code only.
set_param('rtwdemo_hyperlinks', 'GenCodeOnly', 'on');
% Initiate the build process.
rtwbuild('rtwdemo_hyperlinks');
% Generate a traceability matrix.
iec.ExportTraceReport('rtwdemo_hyperlinks');
 

Generate a traceability matrix with traceability among model objects, generated code, and model requirements for the slvnvdemo_fuelsys_docreq model:

% Open the model.
open_system('slvnvdemo_fuelsys_docreq');
% Select the code generation report and traceability report parameters.
set_param('slvnvdemo_fuelsys_docreq', 'GenerateReport', 'on');
set_param('slvnvdemo_fuelsys_docreq', 'GenerateTraceReport', 'on');
set_param('slvnvdemo_fuelsys_docreq', 'GenerateTraceReportSl', 'on');
set_param('slvnvdemo_fuelsys_docreq', 'GenerateTraceReportSf', 'on');
set_param('slvnvdemo_fuelsys_docreq', 'GenerateTraceReportEml', 'on');
% Generate code only.
set_param('slvnvdemo_fuelsys_docreq', 'GenCodeOnly', 'on');
% Initiate the build process.
rtwbuild('slvnvdemo_fuelsys_docreq');
% Generate a traceability matrix.
iec.ExportTraceReport('slvnvdemo_fuelsys_docreq');

Alternatives

You can generate a traceability matrix directly from the code generation report for your model. Go to the Traceability Report section and click the Generate Traceability Matrix button.

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS