Main Content

slwebview_cov

R2026b

Export Simulink models to web views with coverage

Description

filename = slwebview_cov(sysname) exports the system sysname and its children to a web page filename with contextual coverage information for the system displayed on a separate panel of the layered model structure Web view.

filename = slwebview_cov(sysname,Name=Value) uses additional options specified by one or more name-value arguments.

Note

You must have a Simulink® Report Generator™ license to use slwebview_cov.

example

Examples

collapse all

Export all the layers (including libraries and masks) from the system gcs to the file filename

filename = slwebview_cov(gcs,LookUnderMasks="all",FollowLinks="on")

Input Arguments

collapse all

System to export to the web view file, specified as a character vector or string scalar that contains the path to the system or a handle to a subsystem, block diagram, chart, or subchart. By default, the function also exports the child systems of the sysname system. Use the SearchScope name-value argument to specify which other systems to export relative to sysname.

Example: "sysname"

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: slwebview_cov(gcs,SearchScope="CurrentAndBelow",LookUnderMasks="all",FollowLinks="on")

Systems to export relative to the sysname system, specified as one of these values:

  • "CurrentAndBelow" — Exports the Simulink system or the Stateflow® chart specified by sysname and the systems or charts that it contains.

  • "Current" — Exports only the Simulink system or the Stateflow chart specified by sysname.

  • "CurrentAndAbove" — Exports the Simulink system or the Stateflow chart specified by the sysname and the systems or charts that contain it.

  • "All" — Exports all Simulink systems or Stateflow charts in the model that contains the system or chart specified by sysname.

Data Types: char | string

Since R2026b

Whether to treat the specified system as the top-level root in the exported web view, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The function treats the specified system as the top-level root. The generated web view does not include the ancestor subsystems or placeholders for the systems that were not exported.

  • false — The function includes ancestor systems in the web view.

To use this argument, set SearchScope to "CurrentAndBelow".

Data Types: logical

Whether to export masked blocks, specified as one of these values:

  • "none" — The function does not export masked blocks to the web view. The web view includes the masked blocks in the exported subsystems, but does not include the contents of the masked blocks.

  • "all" — The function exports the contents of all masked blocks.

Data Types: char | string

Whether to export referenced models, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The function exports referenced models to the web view.

  • false — The function does not export the referenced models to the web view. The exported systems include the model reference block, but you cannot open the referenced model.

Data Types: logical

Since R2024b

Whether to export referenced subsystems, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The function exports the referenced subsystems to the web view.

  • false — The function does not export referenced subsystems to the web view.

Data Types: logical

Whether to include behavior components defined in architecture models, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The generated web view contains behavior components.

  • false — The generated web view does not contain behavior components.

Data Types: logical

Whether to include user notes, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The generated web view includes user notes.

  • false — The generated web view does not include user notes.

Data Types: logical

Whether to export the MATLAB functions in MATLAB Function blocks or Stateflow charts, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The function exports supporting MATLAB functions and Stateflow charts to the web view.

  • false — The function does not export supporting MATLAB functions and Stateflow charts to the web view.

Data Types: logical

Since R2026a

Variant subsystems to export to the web view, specified as one of these values:

ValueDescription
"All"The function exports subsystems in all variants
"Active"The function exports subsystems in active variants
"ActivePlusCode"

The function exports subsystems in:

  • Active variants

  • Code variants

  • variants with a startup activation time (since R2026b)

Data Types: char | string

Since R2026b

Whether to include the View All navigation tab with diagram thumbnails, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The generated web view includes the View All tab and diagram thumbnails.

  • false — The generated web view does not include the View All tab or diagram thumbnails.

Data Types: logical

Since R2026b

Whether to include the Property Inspector in the web view, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The generated web view includes the Property Inspector.

  • false — The generated web view does not include the Property Inspector.

Data Types: logical

The coverage data to use, specified as a name-value argument with "CovData" as the name and the cvdata objects as the value.

Example: "CovData", covdata

Whether to display the web view in a web browser after you export the web view, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The function displays the web view in a web browser when you export the web view.

  • false — The function does not display the web view in a web browser when you export the web view.

Data Types: logical

Since R2026b

Whether to display a graphical progress bar during export, specified as true (1) or false (0). You can also specify "on" (equivalent to true) or "off" (equivalent to false). When you specify:

  • true — The function displays a graphical progress bar during export.

  • false — The function does not display a graphical progress bar during export.

Data Types: logical

Since R2026b

Whether to display progress messages during export, specified as one of these values:

  • true — The function displays progress messages during export. The Verbosity name-value argument determines the level of detail in the messages.

  • false — The function does not display progress messages during export, regardless of the Verbosity setting.

Data Types: logical

Since R2026b

Level of output detail during export, specified as one of these values:

  • "silent" — The function does not display any progress messages during export.

  • "normal" — The function displays information about the export phases.

  • "detailed" — The function outputs information about export phases and diagram names during the export process.

  • "debug" — The function outputs information about the export phases, diagram names, and internal diagnostics during the export process.

Note

The Verbosity setting has no effect when you set Verbose to false.

Data Types: char | string

Output Arguments

collapse all

Name of the web view file, returned as a character vector or string scalar. For a ZIP output, filename is the path to the .zip file. For an unzipped folder, filename is the path to the webview.html entry-point file.

Tips

A web view is an interactive rendition of a model that you can view in a web browser. You can navigate a web view hierarchically to examine specific subsystems and to see properties of blocks and signals.

You can use web views to share models with people who do not have Simulink installed.

Web views require a web browser that supports Scalable Vector Graphics (SVG).

Version History

Introduced in R2015a

expand all

See Also

(Simulink Report Generator) | (Requirements Toolbox)