Filter löschen
Filter löschen

DeleteFcn and DestroyFcn callbacks

3 Ansichten (letzte 30 Tage)
Adrian Dronca
Adrian Dronca am 31 Aug. 2012
Bearbeitet: Pedro Kulzer am 9 Jul. 2016
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 Kommentare
Jan
Jan am 31 Aug. 2012
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 am 9 Jul. 2016
Bearbeitet: Pedro Kulzer am 9 Jul. 2016
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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Simulation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by