Effacer les filtres
Effacer les filtres

Bypassing a dialog callback in a masked block??

2 vues (au cours des 30 derniers jours)
Karthik
Karthik le 4 Juin 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 commentaire
Sriram Narayanan
Sriram Narayanan le 5 Juin 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Model, Block, and Port Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by