Method for determining height and width of a Simulink annotation
Show older comments
or other text object, like a block name, block annotation ["AttributesFormatString"].
Inputs: Text & Font info (FontAngle, FontName, FontSize, FontWeight).
Outputs: height/width of bounding rectangle - in same units as the "position" parameter for a block.
Needed to allow check for overlapping text, adjusting block dimensions, etc.
Pretty clear such a function exists internal to Simulink (needed to draw text, draw borders around annotations, etc.) -- but damned if I can find it in R2013a.
1 Comment
Answers (1)
Zack Peters
on 29 Oct 2013
0 votes
Hi Douglas,
In Simulink, annotations are classified by Simulink.Annotation objects. These can be programmatically located via the find_system command.
If you know any distinguishing features of the annotation that you are interested in then you can track down the object for that specific one and from there you should be able to modify the annotation object's properties using the methods demonstrated in the link above.
~Zack
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!