Simulink or Stateflow diagram notes reporter
Create a reporter that reports on Simulink® or Stateflow® diagram notes.
To use a
Notes reporter in a report, you must create the report using the
slreportgen.report.Notes class is a
For information on class attributes, see Class Attributes (MATLAB).
notes = slreportgen.report.Notes() creates an
notes = slreportgen.report.Notes(source) creates a
slreportgen.report.Notes reporter for the system specified by
source and sets the Source
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.
Source— Source from which to extract notes
(default) | string scalar | character vector | handle |
Source from which to extract notes, specified as a string scalar, character vector,
slreportgen.finder.DiagramResult object. The source can be a model,
subsystem, Stateflow chart, Stateflow truth table, or Stateflow state transition table.
NoteType— Type of notes
Type of notes, specified as one of the values in this table:
|'Internal'||Note content is included with the model and is saved in a
|'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.
ReportOnInheritNoteType— Whether to report on notes with type inherit
Whether to report on notes that have a
'Inherit', specified as
false. The reported note content is based on the parent note type
as described in this table.
|Parent Note Type||Reported Note Content|
|'Internal'||Link to parent note content|
|'External'||Link to external content specified by the parent note|
TemplateSrc— Source of template for this reporter
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
TemplateSrc property is empty, this reporter uses the default
reporter template for the output type of the report.
TemplateName— Name of template for this reporter
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.
LinkTarget— Hyperlink target for this reporter
(default) | character vector | string scalar |
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.
|Copy the default |
|Subclass the |
|Get the location of the folder that contains the
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);