Simulation supports the integration of custom HTML widgets through the build-in model library named UI Widgets Library.mdzip. You can see its usage in WebUIWidgets in Samples on the Welcome screen under Simulation.
For further technical details, please see also the tutorial for integrating widgets for simulation.
HTML widgets work with most web browsers such as Google Chrome, Microsoft Edge (Chromium), Mozilla Firefox, and Opera. However, if you use older versions of Internet Explorer, e.g., IE 11, you must set the document mode to 11 by doing the following:
|
To use the HTML widgets model library

|
You can use widgets only in diagrams that are based on the Composite Structure Diagram with the conditions applied as follows
Drag the widget from a UI Widgets Library and drop it into the IBD/Composite Structure diagram of the simulation context. Then use a Binding Connector to connect between the value property of the system and Port of the widget with the same Type. The widget can be resized as needed.
You can customize properties of any widgets, e.g., changing colors of cursorKnob, through the following steps:
Open the Specification window of the created Instance Specification. In the left pane of the window, click Slots and choose either Create Value or Edit Value.
The Web Server will automatically start.
If the Web Server plugin is not installed, a warning message with a link to install the plugin will be printed in the Console panel. Widgets on the IBD will not work until the plugin has been installed. |
You can also run the simulation directly from the IBD/Composite Structure diagram that contains widgets either from the right-click menu of the diagram or the Containment tree, or the Simulation toolbar of the diagram. Then the simulation will automatically generate HTML files, and the Web Server will be automatically started, similar to Step 3.
Depending on the circumstances, you can manually regenerate HTML files for further customization of the web UI. Manually regenerating HTML files is possible by right-clicking a «SimulationConfig» and selecting Simulation > Generate HTML.

|
However, if the HTML files already exist, a question dialog will be shown to prevent you from accidentally overwriting them as shown in the figure below.
