- if you want to delete the block for all instances of the subsystem, the you should open the simulink library and use the path to the block from within the simulink library to delete the block.
- If you want to delete the block only for one instance of the subsystem, you will have to first break the link to the library before Simulink will let you delete the block.
Delete Specific Simulink Block in a Linked Subsystem using m-script (MATLAB)
16 次查看(过去 30 天)
显示 更早的评论
How can I delete a specific block (eg: ShiftArith) in a linked subsystem programmatically using MATLAB? I have the block path for the block and I'm using "delete_block" command to delete the block. But I get the following error when executed.
delete_block(blkpath) Attempt to modify block in a linked subsystem. This can only be done by the block or its parent through their mask initialization code
Any methods to delete the block throughout the linked model.
Thanks.
0 个评论
回答(1 个)
Mark McBroom
2022-2-27
You have 2 options.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!