- 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
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Karan Singh
2023-10-4
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 个评论
Nihar Gandhi
2023-10-4
I've also had success creating a fake $DISPLAY using a vncserver on linux, which allows simulink to generate webviews.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Create Model Web Views 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!