Remove Highlighting in Block

조회 수: 52 (최근 30일)
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020년 6월 5일
댓글: Ajay krishna Vasanthakumar 2020년 6월 15일
Hello Community,
when i try to highlight and remove the highlight for a block programitically using hilite_system function
the Blocks loses its foreground colour which was set by default
For example:
switch block's foreground colour is green before simulation
during simulation i am highlighting it to blue
Now,After simulation when i remove the highlight using hilite_system(blockpath,'off')/ hilite_system(blockpath,'none') the default green foreground color has turned to black
I need to retain the foreground color when i remove highlighting
Please help me how to resolve this problem
Thanks
Ajay

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 6월 8일
"during simulation i am highlighting it to blue". It is not highlighting. It is changing color.
If you ran hilite_system(block,'find'), hilite_system(block,'error') then hilite_system(block,'none') or hilite_system(glock,'off'), the original foreground color of the block is preserved.
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2020년 6월 10일
You certainly can do that but my point is that you don't need to do that. If you always use hilite_system() to change the foreground and background color, once you run hilite_system(block,'none'), the original foreground and background color are restored.
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020년 6월 15일
Thanks fangjun :) it is working

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kaushal Dave
Kaushal Dave 2020년 6월 5일
To remove all highlighting, right-click the model, and then select Remove Highlighting, or, on the Signal tab, click Remove Trace.
If you want to remove thethe highlinghting generated from the error in Simulink, we can remove highlighting in Simulink by "Removing Highlighting: To remove all highlighting, select Remove Highlighting from the model's context menu, or select Display > Remove Highlighting." This works for Models, however when saved as a library, this does not work.
  댓글 수: 1
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020년 6월 5일
Hello Kushal Thanks for your reply.But the problem is when i remove the highlighting iam losing the foreground color of the block

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by