Delete all highlight for simuling GoTo and From block

조회 수: 4 (최근 30일)
Alberto Mora
Alberto Mora 2018년 5월 29일
편집: Alberto Mora 2018년 5월 30일
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?

채택된 답변

Alberto Mora
Alberto Mora 2018년 5월 30일
편집: Alberto Mora 2018년 5월 30일
The easiest and fastest solution I found to remove the cyan color is to right-click with the mouse and then "Update Diagram", or left click on the highlighted block.

추가 답변 (1개)

nguyen congkien
nguyen congkien 2018년 5월 30일
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
Alberto Mora
Alberto Mora 2018년 5월 30일
편집: Alberto Mora 2018년 5월 30일
I don't know why, but it does not work.
However if I click the left mouse button, the ciano color disappear and the block become white again (also without running the code that you submit).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by