필터 지우기
필터 지우기

How can I set the background color of a Simulink annotation to a default color other than white in Simulink 7.1(R2008a)?

조회 수: 1 (최근 30일)
Every time I double click on my Simulink model to insert an annotation, the background color of the annotation is white.
I want my annotation background color to be "lightblue" by default.

답변 (2개)

MarkB
MarkB 2011년 1월 21일
Although there isn't any way to change the default background color, you can write MATLAB code that will find all of the annotations and set their background color. Unfortunately, this would still be a user-driven action, not something automatic (i.e. you would still need to actively run the MATLAB code)
The MATLAB "find_system" command can be used to find all of the annotations:
annotations = find_system(sys, 'FindAll', 'on', 'type', 'annotation');
From there, the "set_param" command will allow you to assign a new color to the annotations:
set_param( annotations, 'BackgroundColor', 'blue' );

Vinay
Vinay 2011년 1월 12일
The ability to have a default background color other than white for an annotation is not available in Simulink.
Currently there are no workarounds.

카테고리

Help CenterFile Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by