"Atteming to override parameters inside a library link of ..." error even after setting 'maskselfmodifiable' property
21 views (last 30 days)
I have a model in Simulink (Matlab 2012a) that, depending on the parameters chosen by the user in the mask window, creates more blocks and connects them all or deletes blocks accordindly. To use that model as a library, it was only possible using the 'maskselfmodifiable' property. Otherwise I was getting the "Atteming to override parameters of ... inside a library link" error message. This library works fine. After some time I decided to include a "save to workspace" block to log some variables. This block is located in one of the subsystems that are added or deleted depending on the user choice. So, when I create an additional subsystem, the variable name of the "save to workspace" block remains the same and an error due to logging two signals with the same name pops up as soon as I run the simulation. To fix this, I'm executing the set_param function to change the variable name accordingly. All code is called from the initialization tab of the the library mask. What happens is that I'm now getting the error message "Atteming to override parameters of ... inside a library link", even though 'maskselfmodifiable' property is set. When typing the same command line "set_param(...)" in matlab workspace the variable name is changed! And I just get an warning message: "Warning: Overriding parameters of '...' which is inside a library link". Can someone please explain me how to make that work? I read several posts and in most of them they just say to set the 'maskselfmodifiable' property, which does not work here. PS: Everything works fine if the model is not a library or if the link is disabled.