Simulink background color via CLI

6 ビュー (過去 30 日間)
Luca Ferro
Luca Ferro 2023 年 3 月 17 日
編集済み: Luca Ferro 2023 年 3 月 17 日
i know that in order to change simulink bakcground you right click > Canvas > choose a color
i also know that you can set vis CLI the background (and foreground) of block, for example:
set_param(blockPath,'backgroundcolor',Color);
but this doesn't work for a block_diagram, as it lacks the background or foreground property.
Is there a way to replicate the query shown in the image above via CLI?
Most probably i just cannot find the correct property name, but i've taken a look several times at the whole documentation and found nothing. Also i tried to see if i could find something, but with no luck :
get_param(modelName,'ObjectParameters')

採用された回答

Luca Ferro
Luca Ferro 2023 年 3 月 17 日
編集済み: Luca Ferro 2023 年 3 月 17 日
after going through basically every property of the model with:
get_param(modelName,'ObjectParameters')
i found that the background property is named ScreenColor, so to set it:
set_param(modelName,'ScreenColor',rgbTriplet)
Note: i will not delete the question since it may help someone in the future.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by