How to change the foreground color of a block only, and not its output lines?

15 ビュー (過去 30 日間)
I am trying to color a very specific set of blocks in a model. When I change their ForegroundColor parameter (both via Context Menu and CLI), the color of the output lines also change.
For example:
Screen Shot 2019-06-12 at 7.41.48 PM.png
Workarounds:
1) The desired highlighting can be acheived with the following hilite_system command:
hilite_system(gcb, 'redWhite')
however there are several disadvantages to using this approach, namely that one cannot save the highlighting to the model (it will disappear on model close), and in addition to the blocks I want to highlight, it also highlights all parent subsystem blocks, which I do not want to highlight.
2) The only other alternative I can think of is to forego the use of ForegroundColor and instead use BackgroundColor.
Is there any way in which I can disable the coloring of output signals when setting the ForegroundColor of blocks?
  4 件のコメント
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020 年 6 月 5 日
Can you please explain the workaround ?
Monika Jaskolka
Monika Jaskolka 2020 年 6 月 5 日
The workaround is to use the hilite_system command, which is explained here: https://www.mathworks.com/help/simulink/slref/hilite_system.html

サインインしてコメントする。

採用された回答

Monika Jaskolka
Monika Jaskolka 2020 年 6 月 5 日
編集済み: Monika Jaskolka 2020 年 6 月 5 日
There are no alternative coloring methods at this time.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by