ブロックの背景色一括変更
19 ビュー (過去 30 日間)
古いコメントを表示
モデル全体に対して、該当ブロックタイプの背景色を一括で変更することは可能でしょうか?
<例>
全てのGotoブロックの背景色を緑にする。
0 件のコメント
採用された回答
stozaki
2020 年 2 月 21 日
編集済み: stozaki
2020 年 2 月 21 日
Yamazaki様
以下の様なプログラムは如何でしょうか?
ret = find_system(bdroot(gcs),'BlockType','Goto'); % モデル内からGotoブロックをリストする
for N = 1:length(ret)
set_param(ret{N},'BackgroundColor','green'); % 取得リストのBackgroundColorの値をgreenに設定する
end
find_system : システム、ブロック、ライン、端子、注釈の検索
set_param : システムとブロックのパラメーター値の設定
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!