MATLAB: Are changes to a linked block not always taking effect

aalwaysareblockchangeseffectlinkednotsimulinktakingtowhy

The following behavior has been occured when using Simulink libraries. I have a library and a model which contains a block linked to the library. The block is just a masked S-function.
If changes are made to the block's mask in the model, and then saved, some of the changes are saved and some revert to the library defaults. It seems that the changes that I have made to the masked variable type are not being recognized when I save the model.

Best Answer

The problem is that the mask has defined a mask variable named 'type'. This shadows the Simulink common parameter, 'type', thus causing a bit of confusion. To fix this problem, all that you need to do is rename 'type' to something else in your mask and in the subsystem. Saving the model should then properly reflect the changes.
Another workaround is to break the library link when making changes to the block. You can break all the library links in a model by using:
save_system('model','model','BreakLinks')
Type help save_system for more.
This has been reported to our development staff to be corrected in a future version of Simulink.