Filter löschen
Filter löschen

Bypassing a dialog callback in a masked block??

2 Ansichten (letzte 30 Tage)
Karthik
Karthik am 4 Jun. 2015
I have a masked block where in i have created a popup parameter. I use dialog callback for this parameter to load already saved variable. And then i run the simulation. It is all fine until here.
Now, i want to edit one variable out of the list of variable loaded in base workspace and then run the simulation again. The problem is that the dialog callback is again triggered when i run the simulation which will undo the changes i do to one of the variable.
Do you suggest a different callback?? I tried block callbacks but not suitable for my purpose.
OpenFcn callback: It doesn't allow me to open the mask.
LoadFcn callback: It doesn't load the variables.
InitFcn, StartFcn: Didn't work.
  1 Kommentar
Sriram Narayanan
Sriram Narayanan am 5 Jun. 2015
Hi Karthik,
You mentioned that you tried block callbacks, but, it is not suitable for your purpose. So, can you please clarify your use case. It might be easier if you could share a screenshot of what you are trying to accomplish.
You are right that as soon as you rerun the simulation, the dialog callback is again triggered and this behavior unfortunately cannot be changed because the block dialog's callback will be executed everytime you simulate a model.
There might be a different way of doing what you are trying to accomplish, but, it would be easier to find a way if you could explain the issue in greater detail possibly with screenshots.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Model, Block, and Port Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by