MATLAB: Do graphics disappear from the HTML Doc Block when I close and reopen the model in Simulink 6.5 (R2006b)

.jpgblockbmpdocblockdocumentationgifgraphichtmlimagesjpegphotopicturesrtfsimulinktxt

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.

Best Answer

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 http://www.seamonkey-project.org/), 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.