Why am I unable to delete an annotation using an empty string in SIMULINK 6.3 (R14SP3)?
2 views (last 30 days)
Show older comments
When I try to delete annotations by first getting the handle of the annotation and then setting the "Text" to the empty string by referring to the documentation Section 'Creating Annotations Programmatically',
h = find_system('test', 'FindAll', 'on', 'Type', 'annotation');
set_param(h, 'Name', '');
I receive the following warning and the annotation is not deleted, although the documentation still advocates this method:
Warning: You cannot set an annotation name to an empty string.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
In releases before Simulink 6.5, there is an error in the documentation for deleting annotations under 'Creating Annotations Programmatically'. The documentation should read as follows:
To delete an annotation, use the find_system command to get the annotation's handle and then use DELETE function for e.g.,
delete(find_system(gcs, 'FindAll', 'on', 'type', 'annotation'));
0 Comments
More Answers (0)
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!