generate model advisor reports
by default, when the model advisor runs checks, it generates an html report of check results
in the slprj/modeladvisor/
folder.
additionally, if you have a matlab®
report generator™ license, on windows® platforms, you can generate model advisor reports in adobe® pdf, and microsoft® word
model_name
.docx
formats.
the beginning of the model advisor reports contain the:
model name
simulink® version
system
treat as referenced model
model version
current run
generate results report after executing model advisor checks
to generate a model advisor report in adobe pdf or microsoft word:
in the left pane of the model advisor, select the checks you want to run. click on the folder that contains the checks and, from the toolstrip, click run checks.
when complete, from the toolstrip, click report.
in the save report dialog box:
enter the path to the folder where you want to generate the report.
provide a file name.
click save to generate a report in
html
format.
use can change the file format to
pdf
, orword
using the drop-down options of the report button.the model advisor generates the report and saves it to the designated location.
modify template for model advisor check results report
if you have a matlab report generator license, you can modify the default template that the model advisor uses to generate the report in pdf or microsoft word.
the default template contains fields that the model advisor uses to populate the generated report with information about the analysis. if you want your model advisor report to contain the analysis information, do not delete the fields. when the model advisor generate the report, analysis information overrides the text that you enter in the template field.
template field | in generated report, displays |
---|---|
modelname | model name |
simulinkversion | simulink version |
systemname | system name |
treatasmdlref | whether or not model is treated as a referenced model |
modelversion | model version |
currentrun | model advisor analysis time stamp |
passcount | number of checks that pass |
justifiedcount | number of checks that are justified |
incompletecount | number of checks that fail to run to completion |
failcount | number of checks that fail |
warningcount | number of checks that cause a warning |
nruncount | number of checks that did not run |
totalcount | total number of checks |
checkresults | results for each check |
this example shows how to add a header to a pdf version of a model advisor report.
using microsoft word, open the default template
.matlabroot
/toolbox/simulink/simulink/modeladvisor/resources/templates/default.dotxrename and save the template
default.dotx
to a writable location. for example, save templatedefault.dotx
toc:/work/ma_format/mytemplate.dotx
.in the template
c:/work/ma_format/mytemplate.dotx
file, add a header. for example, in the template header, add the textmy custom header
. save the template as a microsoft word.dotx
file.from the model advisor toolstrip, click report drop-down, and select
template file
.in the select template for report dialog box, enter the path to the folder where your custom template is placed. in this case, the path is
c:/work/ma_format/mytemplate.dotx
.click ok.
from the toolstrip, click report drop-down, and select
pdf
. the model advisor generates the report in pdf format with the custom header.
see also
|
related topics
- (matlab report generator)
- run model advisor checks and review results