| Contents | Index |
iec.ExportTraceReport('model_name')
iec.ExportTraceReport('model_name',
'file_name')
iec.ExportTraceReport('model_name',
'file_name', 'path')
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.
The iec.ExportTraceReport function works in Microsoft Windows platforms only.
To include requirements documentation in the traceability matrix, attach requirements documents to the model before using iec.ExportTraceReport.
You must generate a code generation traceability report (requires an Embedded Coder license) for your model before using iec.ExportTraceReport.
The iec.ExportTraceReport function does not support generating a traceability matrix for referenced models. When you generate a traceability matrix for a model that contains referenced models, the traceability matrix contains information about the Model block only. The traceability matrix does not contain information about the contents of the referenced model. If your model contains referenced models, generate a traceability matrix for the top-level model and each referenced model separately.
In most cases, the iec.ExportTraceReport function identifies comments that you add to the traceability matrix. When the function cannot identify comments, the traceability matrix includes the text:
| Row is not unique: comment |
For more information, see Prerequisites for Generating a 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.
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');
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.

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 |