Set pop-up mask content from file

조회 수: 2 (최근 30일)
Macko
Macko 2011년 7월 1일
Hi,
Is there a way to set the content of a subsystem mask element (popup type) externally? Like from an M file or similar?
Many thanks in advance!

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 7월 1일
Use get() and set() command.
Drag and drop a Subsystem block to a model, type the following line in the command window.
set_param(gcb,'Mask','on','MaskPromptString', 'ParaA|ParaB','MaskStyleString', 'popup(choice1|choice2),edit','MaskVariables','A=@1;B=@2;')
And double click the Subsystem block to see effect.
Best approach is to do reverse-engineering to figure out the detailed syntax. Do the masking manually, go to command window and run get(gcbh) to see the change.
  댓글 수: 2
Macko
Macko 2011년 7월 13일
Many thanks for the answer! Could you please elaborate a bit on the command itself? What exactly is gcb? What are the other parameters in the call?
Thanks a lot!
Fangjun Jiang
Fangjun Jiang 2011년 7월 13일
gcb is Get Current Block. type help gcb to find out
gcbh is Get Current Block Handle. type help gcbh to find out.
The command is to use set_param() to set the masking parameters of the block.

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

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by