Main Content

Display and Navigate Through Web Views

R2026b

Display Web Views After Export

When you export a Web view using the Web View dialog box or from the Report Explorer Web View pane, the Web view appears in your system web browser.

System browser displays block diagram for sldemo_fuelsys on the left and Parameter Attributes on the right

Open Generated Web Views in Web Browser

To open a Web view file in a web browser, navigate to the folder that contains the Web view files, then open the webview.html file. For details about where the files are located and how they are packaged, see Web View Files. You might need to configure your browser to open Web views.

You do not need to configure the built-in MATLAB® HTML Viewer to view Web views. To open a Web view using the built-in MATLAB HTML Viewer:

  1. Navigate to the folder containing your Web view package.

  2. In the Command Window, enter:

    rptview webview.html
    

Web view is displayed in a MATLAB Web browser

You need to run the Google Chrome® browser with an execution flag that allows the Web view file to access other local files in the same folder.

On Macintosh, open a terminal window and enter:

open /Applications/Google\ Chrome.app --args --allow-file-access-from-files

On Linux®, open a terminal window and enter:

./chromium-browser --allow-file-access-from-files

On Windows®, follow these steps to create a custom shortcut:

  1. Locate and copy an existing Google Chrome shortcut. For example, to locate a shortcut file on Windows 10, click the Start button and type Chrome. Then right-click Google Chrome in the search results and select Open file location.

  2. Right-click the new shortcut, select Properties, then select the Shortcut tab.

  3. In the Target field, add a space after the existing text and append:

    --allow-file-access-from-files
    

  4. Click OK.

Properties dialog is open with Shortcut Tab seleced. The text of the Target text box contains the added text.

Note

You must close all instances of Google Chrome for the settings to take effect.

Follow these steps to create a custom shortcut:

  1. Locate and copy an existing Microsoft Edge® shortcut. For example, to locate a shortcut file on Windows 10, click the Start button and type Edge. Then right-click Microsoft Edge in the search results and select Open file location.

  2. Right-click the new shortcut, select Properties, then select the Shortcut tab.

  3. In the Target field, add a space after the existing text and append:

    --allow-file-access-from-files
    

  4. Click OK.

Properties dialog is open with Shortcut Tab seleced. The text of the Target text box contains the added text.

Note

You must close all instances of Microsoft Edge for the settings to take effect.

Follow these steps to configure Safari to allow the Web view file to access other local files in the same folder:

  1. In the menu bar, click Safari.

  2. Click Preferences, then click Advanced.

  3. Select the Show Develop menu in menu bar. The Develop menu appears in the menu bar.

    Safari menu is open and preference is highlighted. Advanced menu is open and Show Develop menu in menu bar is selected.

  4. In the menu bar, click Develop.

  5. Select Disable Local File Restrictions.

    Develop menu is open and the Disable Local File Restrictions option is selected

Note

If you open the Web view and the Safari browser displays the Unsupported Browser message, reload the page after you configure Safari.

Follow these steps to configure Firefox® to allow the Web view file to access other local files in the same folder:

  1. In the address bar, enter about:config and press Enter.

    • If the browser displays the Proceed with Caution warning message, click Accept the Risk and Continue.

    One arrow is pointing at the address bar and another arrow is pointing at the Proceed with Caution button

  2. In the search box, enter security.fileuri.strict_origin_policy and press Enter.

  3. Ensure the value of the property is false. If necessary, click the Toggle button to set the value to false.

    The property is set to false. An arrow is pointing at the toggle button.

Note

If you open the Web view and the Firefox browser displays the Unsupported Browser message, reload the page after you configure Firefox.

You cannot open Web view projects in the Internet Explorer® browser.

View Contents of Systems

To see a thumbnail of the contents of all of systems in the Web view, click the View All tab.

View all tab displays thumbnail images of all systems in Web view

To view the contents of a specific system, use one of these approaches:

  • In the model viewer, double-click the system.

  • In the model browser, select a system. To expose this pane, click Hide/Show Model Browser .

  • Click the View All tab and click the thumbnail of a system.

To open a system in a separate tab, press CTRL and click the system.

To exclude the View All tab, set IncludeViewAllTab to "off" when you generate the web view. (since R2026b)

Note

When you use color to differentiate sample times, web views display only the colors for referenced models. Web views do not display custom colors applied to referenced subsystems.

View Block Parameters and Signal Properties

Click a block or signal in the model to see its parameters or properties in the Property Inspector pane.

In R2024b: The Documentation tab displays the MaskDescription and Description properties for masked subsystems and the Description property for all other blocks.

Block outlined in blue in the model canvas is selected to display parameter attributes in the Property Inspector pane.

In R2026b: To exclude the Property Inspector pane, set IncludePropertyInspector to "off" when you generate the web view.

Access Optional Web View Information

To view the model coverage optional Web view information in a Web view, you must have Simulink® Coverage™ installed. To view the requirements optional Web view information in a Web view, you must have Requirements Toolbox™ installed. To access the information, click a highlighted block (for example, blocks with an orange border have requirements information). The information for that block appears in the Informer pane below the model.

Navigate Using Touch Screen or Trackpad

Since R2023b

Use these gestures to navigate the diagram canvas with a touch screen or trackpad.

NavigationTouch Screen GestureTrackpad Gesture
Zoom in
  • Move two fingers closer to each other

  • Double tap with one finger

Move two fingers closer to each other

Zoom outMove two fingers farther awayMove two fingers farther away
Pan
  • Move two fingers across the touch screen together

  • Move one finger across the touch screen

  • Select the Panning button and hold down the mouse button

  • Hold down the space bar and move fingers

  • Select the Panning button and apply pressure to the trackpad

Pan and zoom inMove two fingers closer to each other while moving them across the touch screenN/A
Pan and zoom outMove two fingers farther away from each other while moving them across the touch screenN/A

See Also

Functions

Topics