Borrar filtros
Borrar filtros

Bypassing a dialog callback in a masked block??

2 visualizaciones (últimos 30 días)
Karthik
Karthik el 4 de Jun. de 2015
Comentada: Sriram Narayanan el 5 de Jun. de 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 comentario
Sriram Narayanan
Sriram Narayanan el 5 de Jun. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Model, Block, and Port Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by