MATLAB: Remove Highlighting in Block

#simulink #highliting blockssimulink

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

Best Answer

"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.
Related Question