Clear Filters
Clear Filters

UnHighlighting a subsytem in a Simulink model

4 views (last 30 days)
Nataraj
Nataraj on 16 Apr 2013
Edited: subhra behera on 18 Aug 2021
Hello everyone,
As a beginner I am struggling with hilite_system functionality of Matlab. In my project I have to highlight certain blocks which I perform using hilite_system. But while unhighlighting these blocks, I have to perform each block individually. Their is an option in the menubar -> View - Remove Highlighting which removes all the highlighting of all the blocks. My question is that can I perform this(removing highlighting of all blocks by one command) via code?
Thanks in advance.
ThN

Answers (2)

Kaustubha Govind
Kaustubha Govind on 16 Apr 2013
Do you have the path to the block(s) that was used with the hilite_system command? If yes, this might work to undo the highlighting:
>> set_param(gcb,'HiliteAncestors', 'none');
  1 Comment
subhra behera
subhra behera on 18 Aug 2021
Edited: subhra behera on 18 Aug 2021
I think the best way is to use
This will remove all highlighting models
>>SLStudio.Utils.RemoveHighlighting(get_param(bdroot,'handle'))

Sign in to comment.


Nataraj
Nataraj on 18 Apr 2013
Hi Kaustubha,
Thankyou very much for the reply. I do use similar trick by if true % hilite_system(handle,'none') end But the problem is that every time I change the hilite, the corresponding blocks pops ups and it is annoying. If you have any other solution let me know.
Thanks in advance. ThN
  1 Comment
P Lepage
P Lepage on 18 Nov 2020
For anyone who might end up on this page in the future, what you can do to avoid this is copy the hilite_system fonction file and comment out the parts where the model screen is resized.

Sign in to comment.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!