Why do graphics disappear from my HTML Doc Block when I close and reopen the model in Simulink 6.5 (R2006b)?

3 views (last 30 days)
In my Simulink model, I add a Doc Block whose 'DocumentType' parameter specifies "HTML". Afterward, I add both text and images to the HTML Doc Block.
If I close and reopen my Simulink model and then double-click the Doc Block to access its associated HTML editor, all of my graphics appear to be missing. Instead, I see a red "X" where my graphics were previously located in the HTML document.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 May 2021
Edited: MathWorks Support Team on 19 May 2021
This issue results from how your system's HTML editor handles graphics referenced in HTML files.
When you add a Doc Block configured for HTML to a Simulink model and invoke its HTML editor (e.g., Microsoft Word), the editor creates a temporary HTML file in your system's TEMP directory. If you paste an image into the HTML editor, the editor stores the graphic in a subdirectory whose name is relative to the temporary HTML filename. However, your HTML editor loses the relative associations between its temporary HTML file and any graphics that it references when you close the Simulink model. Consequently, if you close and reopen the model, and then double-click the Doc Block, the HTML editor can no longer locate and display your graphics.
To work around this issue, try using a more sophisticated HTML editor, such as Mozilla's SeaMonkey Composer (available for free at
), which allows you to specify an absolute pathname for graphic files. The following workaround uses SeaMonkey:
1. Install SeaMonkey.
2. To specify SeaMonkey as the Doc Block HTML editor, execute the following command at the MATLAB prompt:
docblock('setEditorHTML','system(' ' "C:\Program Files (x86)\SeaMonkey\seamonkey.exe" -edit "%<FileName>" &' ');'
3. Double-click an HTML Doc Block to invoke SeaMonkey. Add images to the HTML document using the by either dragging in an image or using the 'Image' button.
4. In the editor, right-click on an image and select 'Image Properties'.
5. Specify an absolute pathname for 'Image Location', e.g., file:///d:/mypics/figure1.png or uncheck the 'URL is relative to page location' checkbox.

More Answers (0)

Categories

Find more on Interactive Model Editing in Help Center and File Exchange

Products


Release

R2006b

Community Treasure Hunt

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

Start Hunting!