Main Content

slreportgen.report.Notes Class

Namespace: slreportgen.report
Superclasses: slreportgen.report.Reporter

Simulink or Stateflow diagram notes reporter

Since R2020a

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.

Creation

Description

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

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

example

slreportgen.report.Notes(Name=Value) sets the reporter properties using name-value pairs. You can specify multiple name-value pair arguments in any order.

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.

Attributes:

NonCopyable
true

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

  • Document Object Model (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 you append this reporter. 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 must be in the template library of the template specified by the TemplateSrc property of this reporter.

Data Types: char | string

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 converts to a LinkTarget object. The link target immediately precedes the content of this reporter in the output report.

Methods

expand all

Examples

collapse all

This example reports the notes for the sldemo_autotrans model. 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 = "sldemo_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);

Version History

Introduced in R2020a