- Export Simulink models to web views - MATLAB slwebview (mathworks.com)
- MATLAB Report Generator - MATLAB (mathworks.com)
- Create and Use Web Views of Models - MATLAB & Simulink (mathworks.com)
Unable to generate webview when -nodisplay option specified
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to generate a WebView in an environment where MATLAB is running without a display, i.e. launching MATLAB via:
matlab -nodisplay -nosplash -nodesktop create_webview
Where create_webview is just a wrapper around slwebview with my project's settings configured:
outfname = slwebview(systemp,'LookUnderMasks','all','FollowLinks','on',...
'FollowModelReference','on',... %Required for model reference
'SearchScope','All',... %Required to follow links within model reference
'ViewFile', false, 'ShowProgressBar', false);
The output of the script is:
Create the webview
Starting slwebview generation...
Error using slreportgen.webview.ui.Exporter/export
Simulink Web View is not supported in -nodisplay mode
Why must I have a display configured/enabled to generate the WebView? In Continuous Integration (CI) environments especially, it not possible to have a display configured.
0 commentaires
Réponses (1)
Karan Singh
le 4 Oct 2023
Hi Adam,
From what I understand, the goal is to understand why a display is required to generate the web view and why this limitation exists, particularly in CI environments where having a display is not feasible.
This is because the Simulink Web View relies on graphical capabilities to generate and display the web view of the Simulink model. In “-nodisplay” mode, MATLAB does not have access to a display system, which is required for generating the web view. This limitation is not specific to Continuous Integration (CI) environments but is inherent to MATLAB's design.
If you need to generate a web view without a display, you can consider alternative approaches. For example, you could generate a report or documentation using MATLAB's Report Generator tools (such as MATLAB Report Generator or MATLAB Publishing) and include relevant information about your Simulink model.
Attached below are some documentation links that you may find helpful:
Hope this helps!
Karan Singh Khati
2 commentaires
Nihar Gandhi
le 4 Oct 2023
I've also had success creating a fake $DISPLAY using a vncserver on linux, which allows simulink to generate webviews.
Voir également
Catégories
En savoir plus sur Create Model Web Views dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!