DeleteFcn and DestroyFcn callbacks

I want to be able to do specific operations when I delete a block. DeleteFcn and DestroyFcn are perfect for that.
There is 1 small problem :)
The callbacks get executed also when the model closes. This behavior I do not need.
Is there a way to know from where the callback was executed ? Closing the model or deleting the block, or maybe there is another way of doing it.
Thanks in advance!!
Adrian.

댓글 수: 2

Jan
Jan 2012년 8월 31일
While the "DeleteFcn" is explained exhaustively in the docs, I cannot find anything about a "DestroyFcn", even not in the net.
Pedro Kulzer
Pedro Kulzer 2016년 7월 9일
편집: Pedro Kulzer 2016년 7월 9일
Just do a simple get(gbch) while a block is selected and voilá: the "DestroyFcn" indeed exists... ;-) What's more, not sure which net you searching and yes, it's been a while, but here it is: http://www.mathworks.com/help/simulink/ug/block-callbacks.html#btoy_jj

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

제품

질문:

2012년 8월 31일

편집:

2016년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by