Bypassing a dialog callback in a masked block??
조회 수: 2 (최근 30일)
이전 댓글 표시
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
Sriram Narayanan
2015년 6월 5일
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!