slreportgen.webview.EmbeddedWebViewDocument Class
Namespace: slreportgen.webview
Superclasses: slreportgen.webview.WebViewDocument
Create a report generator that generates an HTML report containing an interlinked document and associated web view
Description
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 report generator based on an
slreportgen.report.Report
object. You can use DOM and Report APIs to fill the document content.An 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 namedContent
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)
JavaScript that generates a TOC from document headings when the report opens in a browser
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
The slreportgen.webview.EmbeddedWebViewDocument
class is a handle
class.
Creation
Description
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.EmbeddedWebViewDocument(rptname
,model
)fill
method to generate the web view and embed the web
view in the document. Use the generator’s 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(rptname
,model1
,model2
,...modeln
)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 generated document.
creates a generator that includes the specified models in the web view that
it embeds in the output document. rptgen
= slreportgen.webview.EmbeddedWebViewDocument(rptname
,{model1
,model2
,...modeln
})
creates a generator that embeds models specified by the
rptgen
= slreportgen.webview.EmbeddedWebViewDocument(rptname
)Diagrams
property of the generator’s ExportOptions
property, for
example:
import slreportgen.webview.* rptgen = EmbeddedWebViewDocument('myDoc'); rptgen.ExportOptions.Diagrams = 'myModel';