Why am I unable to delete an annotation using an empty string in SIMULINK 6.3 (R14SP3)?
2 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
MathWorks Support Team
2009-6-27
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!