필터 지우기
필터 지우기

How to prevent a background subsystem from opening

조회 수: 3 (최근 30일)
Ilya
Ilya 2015년 4월 6일
답변: ashish ahir 2015년 4월 8일
it's known that the only way to create colored backgrounds for block groups in Simulink is to create empty masked subsystems and place them behind the blocks ("Send to back") However, I've noticed that when I click on such a background, the contents of the subsystem open up (i.e. an empty white field, because the "background" subsystem is usually created without any blocks inside). Is it possible to prevent a subsystem from opening by clicking, so that nothing happens when a subsystem is clicked?

채택된 답변

TAB
TAB 2015년 4월 7일
Just close the subsystem as soon as they open from "OpenFun" callback of subsystem. Goto Block Properies >> Callbacks >> OpenFcn and write
close_system(gcbh);
in OpenFcn callback
  댓글 수: 1
Ilya
Ilya 2015년 4월 8일
Thanks a lot, I thought it should be easier!

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

추가 답변 (2개)

Sebastian Castro
Sebastian Castro 2015년 4월 6일
The easiest thing, although not necessarily the most feasible, would be to upgrade to R2015a if you can. In this release, Simulink has new Area Annotations.
- Sebastian

ashish ahir
ashish ahir 2015년 4월 8일
simple way may be to select the blocks you want to put under one section and give them seperate background colour.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by