Display and Navigate Through Web Views - MATLAB & Simulink (original) (raw)

Display Web Views After Export

When you export a Web view using the Web View dialog box or from the Report ExplorerWeb 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.

MATLAB HTML Viewer

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:

Web view is displayed in a MATLAB Web browser

Google Chrome

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 --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 typeChrome. 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.

Microsoft Edge

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 typeEdge. Then right-click on 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.

Safari

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. TheDevelop 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.

Firefox

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 pressEnter.
    • 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, entersecurity.fileuri.strict_origin_policy and pressEnter.
  3. Ensure the value of the property is false. If necessary, click the Toggle button Toggle button to set the value tofalse.
    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.

Internet Explorer

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 theView 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:

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

View Block Parameters and Signal Properties

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

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

Block outlined in blue in the right pane is selected to display parameter attributes in right pane.

Access Optional Web View Information

To view the model coverage optional Web view information in a Web view, you must haveSimulink® Coverage™ installed. To view the requirements optional Web view information in a Web view, you must have Requirements Toolbox™ installed. To access thebr 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.

Since R2023b

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

Navigation Touch Screen Gesture Trackpad Gesture
Zoom in Move two fingers closer to each otherDouble tap with one finger Move two fingers closer to each other
Zoom out Move two fingers farther away Move two fingers farther away
Pan Move two fingers across the touch screen togetherMove one finger across the touch screenSelect the Panning button Hand icon and hold down the mouse button Hold down the spacebar and move fingers Select the Panning button Hand icon and apply pressure to the trackpad
Pan and zoom in Move two fingers closer to each other while moving them across the touch screen N/A
Pan and zoom out Move two fingers farther away from each other while moving them across the touch screen N/A

See Also

Functions

Topics