MATLAB Answers

How to apply/check changes in a Simulink Mask via callback?

76 views (last 30 days)
Björn Bobe
Björn Bobe on 28 Oct 2015
Answered: Kurt Stewart on 14 Jan 2019
Hello,
At the moment i am going to set up Simulink block mask, which is changing the content of popup elements due to entries inside an edit field. Therefore I need to know, how to "press" the Apply button of the Mask-GUI via script, respectively how to check if the GUI has unapplied changes.
I am using Matlab Simulink 2013b.
Thanks in advance, Bjoern

  0 Comments

Sign in to comment.

Answers (2)

Titus Edelhofer
Titus Edelhofer on 28 Oct 2015
Hi Bjoern,
when the user presses enter after editing the field, the MaskCallback is executed. This is the callback in which you should validate what the user entered (and do the manipulations you describe).
Titus

  1 Comment

Björn Bobe
Björn Bobe on 28 Oct 2015
Hi Titus, thanks for the fast answer. This is exactly what I am doing and inside this callback I would like to call the function which is behind the mask "Apply" button (most bottom right), respectively to check if the GUI has unapplied changes.
But i do not know the function calls.

Sign in to comment.


Kurt Stewart
Kurt Stewart on 14 Jan 2019
HI Bjorn,
The way you can do this is save your model in MATLAB before running the model:
save_system('Autonomous_Dynamic_Model_Sim3');

  0 Comments

Sign in to comment.

Sign in to answer this question.