Class: slreportgen.webview.EmbeddedWebViewDocument
Package: slreportgen.webview

Link and anchor in embedded Web view report



diag2link = createDiagramTwoWayLink(wvdoc,dhandle,domlabel) creates a two-way connection between a Simulink® Web view diagram and a DOM object in an embedded Web view Document panel. The diag2link DOM object is updated to include attributes that identifies it as a link. The diag2link DOM object is of the same type as domlabel or if domlabel is a string, an mlreportgen.DOM.Text object is created.

Input Arguments

expand all

Web view document, specified as an slreportgen.webview.WebViewDocument object.

Handle of Web view diagram anchor, specified as a character vector of the path or as an object handle. You can use the getExportDiagrams method to obtain the diagram paths and handles.

Example: Character vector: 'vdp'. Object handle: get_param('vdp','handle')

DOM object from which to link, specified as a valid DOM object or as a character vector. If you enter a character vector, an mlreportgen.DOM.Text object is created.

Output Arguments

expand all


Create Two-Way Diagram Link

Create a two-way connection between a level 2 heading in the center text pane and a diagram in the Web view. This creates both a link and an anchor.

diagramHeading = createDiagramTwoWayLink(h,diagramPath, ...
   mlreportgen.dom.Heading(2,['Diagram: ' diagramPath]));

More About

expand all

Introduced in R2017a