Export Simulink models to Web views
slwebview starts the Web View dialog box
in the Report Explorer.
Open the fuel rate controller subsystem.
Export to a Web view the fuel rate controller subsystem
and the system that contains it. Do not export the subsystems that
it contains. This example assumes the current folder is the
fuelsys_web_view = slwebview... ('fuelsys/fuel rate controller','SearchScope','CurrentAndAbove')
fuelsys_web_view = H:\fuel_rate_controller\webview.html
The Web view displays in the system browser.
Export to a Web view the
and allow access to the models it references.
depgraph_web_view = slwebview... ('sldemo_mdlref_depgraph','FollowModelReference','on')
depgraph_web_view = H:\sldemo_mdlref_depgraph\webview.html
The Web view displays in the system browser. In the Web view, you can open the models referenced by the Model blocks.
Click a Model block to see its properties. Double-click a Model block to display the referenced model.
system_name— The system to export to a Web view file
Exports the specified system or subsystem and its child systems
to a Web view file. By default, child systems of the
are also exported. Use the
pair to export other systems, in relation to
Specify optional comma-separated pairs of
Name is the argument
Value is the corresponding
Name must appear
inside single quotes (
You can specify several name and value pair
arguments in any order as
htmlFileName = slwebview(gcs,'LookUnderMasks','all',... 'FollowLinks','on')Export to a Web view all layers of the model hierarchy to which the current system belongs, including the ability to interact with library links and masks.
'SearchScope'— Systems to export, relative to the
'CurrentAndBelow' exports the Simulink® system
or the Stateflow® chart specified by
all systems or charts that it contains.
'Current' exports only the Simulink system
or the Stateflow chart specified by
'CurrentAndAbove' exports the Simulink system
or the Stateflow chart specified by the
all 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
'LookUnderMasks'— Specifies whether to export the ability to interact with masked blocks
'none' does not export masked blocks in the
Web view. Masked blocks are included in the exported systems, but
you cannot access the contents of the masked blocks.
'all' exports all masked blocks.
'FollowLinks'— Specifies whether to follow links into library blocks
'off' does not allow you to follow links
into library blocks in a Web view.
'on' allows you to follow links into library
blocks in a Web view.
'FollowModelReference'— Specifies whether to access referenced models in a Web view
'off' does not allow you to access referenced
models in a Web view.
'on' allows you to access referenced models
in a Web view.
'ViewFile'— Specifies whether to display the Web view in a Web browser when you export the Web view
true displays the Web view in a Web browser
when you export the Web view.
false does not display the Web view in a
Web browser when you export the Web view.
'ShowProgressBar'— Specifies whether to display the status bar when you export a Web view
true displays the status bar when you export
a Web view.
false does not display the status bar when
you export a Web view.
filename— The name of the HTML file for displaying the Web view
Reports the name of the HTML file for displaying the Web view. Exporting a Web view creates the supporting files, in a folder.
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).