Problems while setting BackgroundColor of a Simulink masked subsystem

Hello together,
I want to set the bachgroundcolor of a Simulink masked subsystem to a specific rgb value. According to the help it can be done by:
set_param(gcb,'BackgroundColor',[1,1,1])
Using this leads to an error.
Warning: Could not evaluate MaskDisplay commands of block 'test/ICE_2_ECLTUCH': Invalid setting in SubSystem
block (mask) 'ICE_2_ECLTUCH' for parameter 'BackgroundColor'
Invalid setting in SubSystem block (mask) 'ICE_2_ECLTUCH' for parameter 'BackgroundColor'
Anyone an idea?!
Regs Marcus

 Accepted Answer

If your subsystem is called ICE_2_ECLTUCH and your simulink model called untitled
set_param('untitled/ICE_2_ECLTUCH','backgroundcolor','[1 0 1]')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!