Using Simulink Previous page   Next Page

Creating Annotations Programmatically

You can use the Simulink add_block command to create annotations at the command line or in an M-file program. Use the following syntax to create the annotation:

where path is the path of the diagram to be annotated, text is the text of the annotation, and [center_x, 0, 0, center_y] is the position of the center of the annotation in pixels relative to the upper left corner of the diagram. For example, the following sequence of commands

creates the following model:

To delete an annotation, use the find_system command to get the annotation's handle. Then use set_param to set the annotation's Name property to the empty string, e.g.,


Previous page  Using TeX Formatting Commands in Annotations Creating Subsystems Next page

© 1994-2005 The MathWorks, Inc.