Delete all highlight for simuling GoTo and From block
Show older comments
Good morning. Is there any way to remove highlighted GoTo and From for all blocks highlighted (typically blue) without pressing the link of GoTo or From block?
Accepted Answer
More Answers (1)
nguyen congkien
on 30 May 2018
You can open your model, save the code below in m file and Run it.
%=====================================================================
function run_code()
%For Goto block
remove_highlight('Goto');
%For From block
remove_highlight('From');
end
function remove_highlight(blktype)
blk_hdl = find_system(bdroot,'FindAll','on','BlockType',blktype);
for i = 1 : length(blk_hdl)
set_param(blk_hdl(i),'ForegroundColor','Black','BackgroundColor','White');
end
end
%=====================================================================
1 Comment
Alberto Mora
on 30 May 2018
Edited: Alberto Mora
on 30 May 2018
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!