slreportgen.report.Notes class

Package: slreportgen.report

Simulink or Stateflow diagram notes reporter

Description

Create a reporter that reports on Simulink® or Stateflow® diagram notes.

Note

To use a Notes reporter in a report, you must create the report using the slreportgen.report.Report class.

The slreportgen.report.Notes class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes (MATLAB).

Creation

Description

notes = slreportgen.report.Notes() creates an empty slreportgen.report.Notes reporter.

example

notes = slreportgen.report.Notes(source) creates a slreportgen.report.Notes reporter for the system specified by source and sets the Source property to source.

slreportgen.report.Notes(Name,Value) sets the reporter properties using name-value pairs. You can specify multiple name-value pair arguments in any order. Enclose each property name in single or double quotes.

Properties

expand all

Source from which to extract notes, specified as a string scalar, character vector, handle, or slreportgen.finder.DiagramResult object. The source can be a model, subsystem, Stateflow chart, Stateflow truth table, or Stateflow state transition table.

Type of notes, specified as one of the values in this table:

ValueDescription
'Internal'Note content is included with the model and is saved in a .mldatx file.
'External'Note content is external to the model and is specified by a URL.
'Inherited'Note content originates from the ancestors of the specified diagram source.
'None'The diagram does not have notes.

This property is read-only.

Whether to report on notes that have a NoteType of 'Inherit', specified as true or false. The reported note content is based on the parent note type as described in this table.

Parent Note TypeReported Note Content
'Internal'Link to parent note content
'External'Link to external content specified by the parent note
'None'Empty content

Source of the template for this reporter, specified in one of these ways:

  • Character vector or string scalar that specifies the path of the file that contains the template for this reporter

  • Reporter or report whose template is used for this reporter or whose template library contains the template for this reporter

  • DOM document or document part whose template is used for this reporter or whose template library contains the template for this reporter

The specified template must be the same type as the report to which this reporter is appended. For example, for a Microsoft® Word report, TemplateSrc must be a Word reporter template. If the TemplateSrc property is empty, this reporter uses the default reporter template for the output type of the report.

Name of the template for this reporter, specified as a character vector or string scalar. The template for this reporter is in the template library of the template source (TemplateSrc) for this reporter.

Hyperlink target for this reporter, specified as a character vector or string scalar that specifies the link target ID, or an mlreportgen.dom.LinkTarget object. A character vector or string scalar value is converted to a LinkTarget object. The link target object immediately precedes the content of this reporter in the output report.

Methods

expand all

Examples

collapse all

This example reports the notes for the slreportgendemo_autotrans model, which is a version of the sldemo_autotrans model with notes. This example reports the notes for the overall model. For an example that reports the diagram and notes for each subsystem of the model, see Report Model Notes.

The example creates a chapter for the notes and includes the model notes in the chapter by adding an slreportgen.report.Notes reporter to the chapter.

model = "slreportgendemo_autotrans";
open_system(model);

import mlreportgen.report.*
import slreportgen.report.*

rpt = slreportgen.report.Report(model + "_Notes_Report","pdf");
open(rpt);

ch = Chapter("Title", model + " Notes");
notes = Notes(model);
add(ch,notes);
add(rpt,ch);

close(rpt);
rptview(rpt);

Introduced in R2020a