Simulink custom library help, relative file paths to image not working

4 ビュー (過去 30 日間)
Mike Buba
Mike Buba 2018 年 11 月 30 日
回答済み: Mike Buba 2018 年 12 月 3 日
Hi,
I am writing a help file for custom libraties. I am susing HTML to write help. I am having trouble using relative path when calling image file.
This code
<p><img src="Help/Picture1.png" alt="Block1 description" width="300" /></p>
does not show image when I open block's help page. If I save code as a *.html in myLib folder I can see picture in web browser. 'Help' foder is located in the same folder together with myLib.slx file.
Does anyone know how to solve this problem? Is block's help file generated (stored) somewhere else so maybe relative path is not correct? If I use absolute file path - no problem.
Regads
  2 件のコメント
Fangjun Jiang
Fangjun Jiang 2018 年 11 月 30 日
Does it make a difference if using "./Help/Picture1.png"?
Mike Buba
Mike Buba 2018 年 11 月 30 日
No. I tried and it does not.
It works fine if I copy all to separate html file and open it in the web browser. This html file is located in the same location where myLib.slx is.

サインインしてコメントする。

採用された回答

Mike Buba
Mike Buba 2018 年 12 月 3 日
I saved Help as html file (e.g. myLibHelp.html). In this html file I used realtive path and tested in web browser.
For each block under Mask -> Edit Mask -> Documetation tab -> Mask help I used
web('myLibHelp.html')
It works.
In my case myLibHelp.html and myLib.slx are in the same folder.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

製品


リリース

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by