Method for determining height and width of a Simulink annotation
Mostrar comentarios más antiguos
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 comentario
Respuestas (1)
Zack Peters
el 29 de Oct. de 2013
0 votos
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 comentario
Douglas
el 29 de Oct. de 2013
Categorías
Más información sobre Programmatic Model Editing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!