RefModificationViolation when changing submodel

I am getting this error:
??? Error using delete
Attempt to modify block in a linked subsystem. This can only be done by the block or its parent through their mask initialization code
When I try to do the following:
b1 = add_block('built-in/SubSystem',blockName);
set_param(b1, **********);
if ishandle(b1)
delete_block(b1);
end
What could it be?
I have checked and doulbechecked the paths and they all are right, the model is working fine is being loaded fine too, I can not disclose more information because I really do not understand what is going on.

답변 (0개)

카테고리

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

제품

릴리스

R2017a

질문:

2020년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by