How can I change the color of all similar blocks in a complex simulink system programmatically?
Mostrar comentarios más antiguos
I have multi level simulink system with masked subsystems and libraries. The previous owners have the coloring jumbled and I want to write a script to find all blocks of the same type and change the color of those blocks.
Think of this as enforcing styling guidelines.
Respuesta aceptada
Más respuestas (1)
KL
el 21 de Nov. de 2017
use findblocks to get all blocks of your model,
and then apply if else or your logic to separate your blocks and use setparam and BackgroundColor property like,
set_param(gcb,'BackgroundColor','red');
Categorías
Más información sobre Programmatic Model Editing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!