Remove dashed lines from Simulink diagram

Hello,
Sometimes, after editing a simulink diagram many red dashed lines remain on diagram. Is it possible to remove all them at once ? Thanks.

回答(1 个)

delete_line(find_system(your_model, 'FindAll', 'on', 'Type', 'line', 'Connected', 'off'))

2 个评论

Thanks. Does exist a shortcut for this command somewhere in Simulink options, e.g. "Refresh Diagram" or something like this ?
Not that I am aware. This code will find and delete all unconnected lines, which is something that should be done carefully. If you want to make it easy to do repeatedly, you could consider making it the ClickFcn of an annotation on your diagram.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Simulink 的更多信息

标签

提问:

2016-11-7

评论:

2016-11-8

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by