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.

Respuestas (0)

Categorías

Productos

Versión

R2017a

Preguntada:

el 30 de Oct. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by