How do I load text stored in an external file and display it as an annotation in a Simulink models?
古いコメントを表示
I like to include lots of annotations in my model files that clearly describe what's going on in a visible way (without having to click to open documents or open links etc). However, our technical publications guys need to review, edit, spell-check etc any documentation - but obviously don't want to edit and resave MDL files, in case they break something.
I'd therefore like some way of giving them a separate file to review for a model containing the text for all the annotations (perhaps an xml file) but pre-load this to populate the annotation text in my model.
Any ideas how I might do this? PreLoadFcn callbacks & xmlreads?
採用された回答
その他の回答 (1 件)
Mark
2011 年 5 月 17 日
0 投票
One possible way to do this is to use a mask on top of an empty subsystem instead of annotations. From there, you can use the mask drawing commands to add arbitrary text as the display for the block.
However, this isn't particularly elegant because there isn't very much variety in what you can do to format the text, and the block doesn't resize to fit the text either.
If you can tolerate a few additional clicks in your process, it might be better to combine a masked, empty subsystem with documentation stored in an HTML file. You can use the "web" command in the mask's help dialog to cause it to open the HTML file in a separate window.
カテゴリ
ヘルプ センター および File Exchange で Programmatic Model Editing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!