Is it possible to delete a Simulink block from the block's callback function?
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および 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!