Can I change the color of a block in SIMULINK to match its color in the library?

14 次查看(过去 30 天)
I would like to change the color of a block in a library and have the colors of the blocks used in my models updated automatically to match the colors in the library.

采纳的回答

MathWorks Support Team
There is no way to propagate the block colors from the library into the blocks in the model.
To work around this issue, you can either change the color of the block programmatically using the SET_PARAM function.
For example, the following command programmatically sets the background color of the currently selected system or subsystem to a light green color:
set_param(gcs, 'ScreenColor', '[0.3, 0.9, 0.5]')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by