Is it possible to delete a Simulink block from the block's callback function?
Mostrar comentarios más antiguos
I would like to create singleton Simulink blocks. In other words, if a user tries to create a copy of the Simulink block, the copy should automatically get deleted. I have tried to implement this in the block's CopyFcn callback. But the block does not get deleted, and I get the following warning:
Warning: Error evaluating 'CopyFcn' callback of Sin block 'mymodel/Sine Wave1'. Error using ==> delete_block
Cannot delete 'mymodel/Sine Wave1' while in a callback.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Model, Block, and Port Callbacks en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!