Method for determining height and width of a Simulink annotation
Ältere Kommentare anzeigen
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 Kommentar
Antworten (1)
Zack Peters
am 29 Okt. 2013
0 Stimmen
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
1 Kommentar
Douglas
am 29 Okt. 2013
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!