Create a report generator that generates an HTML report containing an interlinked document and associated web view
Creates a report generator that generates an HTML report containing a document and a web view of one or more Simulink®models, with two-way hyperlinks between the document and the web view.
This class provides the following facilities for generating embedded web view reports:
A DOM document to generate the report
A DOM HTML template with three panels for a table of contents (TOC), document content, and a web view, respectively
Template holes to be filled with the document content and a web view,
respectively. The hole for the web view is named
slwebview and is located in the right panel of the
report. The hole for document content is named
and is located in the center panel of the report.
Methods for filling the document and web view holes.
Methods for creating two-way hyperlinks between the document content and embedded webview(s)
Model export options that allow you to specify the models and subsystems to be embedded as web views in the generated report
Methods for retrieving elements (diagrams, blocks, charts, etc.) from models to be embedded as web views in the report
creates a report generator that generates a report having the specified file name and
containing a web view of the specified model. Use the generator’s
rptgen = slreportgen.webview.Embedded
method to generate the web view and embed the web view in the document. Use the
close method to output the document as a zip file or folder
containing the HTML document.
creates a report generator that includes two or more models in the web view that it
creates. This constructor assigns an array of default
rptgen = slreportgen.webview.EmbeddedWebViewDocument(
slreportgen.webview.ExportOptions objects to the generator’s
ExportOptions property, one for each of the models to be
included in the generated document’s web view. You can use the objects to specify custom
export options for each of the models to be included in the web view exported to the
import slreportgen.webview.* rptgen = EmbeddedWebViewDocument('myDoc'); rptgen.ExportOptions.Diagrams = 'myModel';
rptname— Name of output report file and/or folder
Name of the zip file and/or folder containing the report generated by this
generator. Use this generator’s
PackageType property to
specify whether to package the generated report as a file or a folder or
both. If you specify an extension, the extension must be
.htmx. If you do not specify an extension, the report
model— Name of model to export
Name of model, specified as a character vector, to be embedded in the generated report as a web view.
rptgen— Embedded web view report generator
CurrentHoldID— Identifier of current hole in document
Identifier of current hole in document, stored as a character vector. This is a read-only property.
ExportOptions— Web view export options
An array of
slreportgen.webview.ExportOptions objects, one for each model
or set of models to be included in the web view exported to the generated
report. The generator’s constructor sets this property with default values
for the models you specify. Use the properties of the export options object
or objects to customize export of the models to the generated web view. For
example, you can specify additional models to include or whether to include
the block diagrams of masked subsystems and library blocks.
ForceOverwrite— Overwrite existing report
Whether to overwrite an existing report with the same name.
True overwrites the existing report.
False generates the report under a new name.
OpenStatus— Status of the report being generated
Status of the report being generated, either
'opened'. This is a read-only property.
OutputPath— Path of the document output directory
Path of the report output directory.
PackageType— Packaging for files generated
Packaging to use for output document, specified as one of these character vectors:
'both' — Creates both zipped and
'zipped' — Creates a zip file with
'unzipped' — Creates a folder of
TemplatePath— Path of the template used to generate this report
Path to the HTML template to use to generate this report, specified as a
character vector. The template has an
This property points by default to a default template. To use a custom
template, set this property to the path of the custom template.
TitleBarText— Text for HTML browser title bar
Text to display in the title bar of the HTML browser used to display the generated report. The default text is “Simulink Web View - Created by Simulink Report Generator."
ValidateLinksAndAnchors— Whether to check validity of hyperlinks between the generated document and web view
Generates a warning at the command line if the link target that you specify does not exist or if you specify a link from a model element that already has a link. Validation checking increases the time required to generate a report. For this reason, consider using link validation checking only when debugging your report.
Creates a two-way link between a location in the document in the center panel and a diagram in the web view in the right panel
Creates a two-way link between a document panel location and a diagram element in the web view
Creates a link from the document panel to a diagram in the model web view
Creates a link from the document panel to an element in the model web view
Invoke the embedded web view report generator’s hole filling methods to fill the holes in its template.
|Fills template’s slwebview hole with a web view|
|Names of models to be included in the web view|
|Paths and handles of block diagrams to be included in the web view|
|Paths and handles of subsystem blocks to be included in this web view|
|Paths and handles of Stateflow® charts to be included in this web view|
|Array of Stateflow diagram paths|