Delete annotation
delete(a)
example
delete(a) deletes the specified annotation.
a
collapse all
Programmatically delete an annotation.
Open the vdp model.
vdp
To get the handles for the annotations in the model, use the find_system function.
find_system
h = find_system(gcs,'FindAll','on','Type','annotation');
To identify the annotations, query the text inside the annotations.
get_param(h,'PlainText')
ans = 2x1 cell {'Copyright 2004-2020 The MathWorks, Inc.'} {'van der Pol Equation' }
To delete the title of the model ('van der Pol Equation'), get the Simulink.Annotation object that corresponds to the second handle.
'van der Pol Equation'
Simulink.Annotation
a = get_param(h(2),'Object');
Delete the annotation from the model.
Annotation, specified as a Simulink.Annotation object.
setImage | Simulink.Annotation | view
setImage
view
You have a modified version of this example. Do you want to open this example with your edits?