Documentation

slreportgen.webview.EmbeddedWebViewDocument.createElementTwoWayLink

Package: slreportgen.webview

Element link and anchor in embedded Web view report

Syntax

elem2link = createDiagramTwoWayLink(wvdoc,ehandle,domlabel)

Description

example

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

Examples

Create Two-Way Element Link in Embedded Web View Report

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

blockHeading = createElementTwoWayLink(h,blockHandle, ...
   mlreportgen.dom.Heading(3, get_param(blockHandle,'Name')));

Input Arguments

collapse all

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

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

Example: Character vector: 'vdp/mu'. Object handle: get_param('vdp/mu','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

collapse all

More About

collapse all

Diagram

Diagram refers to a Simulink model, subsystem, or Stateflow® chart.

Element

Element refers to an individual item within a diagram, such as a block, annotation, state, or transition.

Introduced in R2017a

Was this topic helpful?