MATLAB: Problems while setting BackgroundColor of a Simulink masked subsystem

backgroundcolormasked 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

Best 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]')
Related Question