slreportgen.report.ScopeSnapshot Class
Namespace: slreportgen.report
Superclasses: slreportgen.report.Reporter
Description
Create a Simulink® scope reporter. When added to a report, Simulink scope reporters create a snapshot of the specified scope block and adds the snapshot to the report as an image with an optional caption. Use the Source property to specify the desired scope.
Note
To use a ScopeSnapshot reporter in a report, you must create the
report using the slreportgen.report.Report class.
The slreportgen.report.ScopeSnapshot class is a handle class.
Creation
Description
sets the Source property to
ssReporter = ScopeSnapshot(source)source. Adding this reporter to a
slreportgen.report.Report object, without any further modification, adds
the scope snapshot information based on default settings of the
slreportgen.report.Report object. The snapshot displays in the generated
report as an image with a caption. See slreportgen.report.Report.
sets properties using one or more name-value arguments. You can specify multiple name-value arguments in any order.ssReporter = ScopeSnapshot(PropertyName=Value)
Properties
Methods
Examples
Limitations
If you run your simulation with the
parsimfunction, this class is not supported.
Tips
If the snapshot that the ScopeSnapshot object adds to your report is
missing or empty, check the order in which you add reporters to your report.
slreportgen.report.ScopeSnapshot objects require the model to be uncompiled
in order to capture the window of the Scope block. Some reporters, such as slreportgen.report.Diagram, compile the model when you append them to the report.
If you append one of these reporters before the ScopeSnapshot reporter, the
ScopeSnapshot reporter cannot capture the scope window because the model is
no longer uncompiled.
These reporters require a compile the model when you add them to the report:
Additionally, slreportgen.report.Diagram reporters require a compiled model when you enable
execution-order, sorted-order, or timing overlays.
To prevent these issues:
If possible, append the
ScopeSnapshotreporter to your report before any reporter that compiles the model:append(chapter, slreportgen.report.ScopeSnapshot(model + "/Scope")); append(chapter, slreportgen.report.Diagram(model));
If the reporting sequence requires
ScopeSnapshotto occur after a reporter that compiles the model:Uncompile the model.
slreportgen.utils.uncompileMode(model);
Simulate the model.
sim(model);
Retrieve the DOM object that the
ScopeSnapshotreporter uses and append it to the chapter. Appending the DOM object to the chapter forces the reporter to take the snapshot immediately, while the model is still uncompiled.reporter = slreportgen.report.ScopeSnapshot(model + "/Scope"); reporterObj = getImpl(reporter,rpt); append(chapter,reporterObj);
Recompile the model.
slreportgen.utils.compileMode(model);