I have a custom simulink created with R2012b. When opening it in R2014b for the first time, I get a message that repository information is missing for the library. Is there a way to auto-generate that information? Note that simply saving the library in R2014b is no option, as I cannot load it in R2012b after that any longer.
So far, I tried the following:
1. Set the parameter 'EnableLBRepository' in R2012b. That did not work, reading the parameter in R2014b returned 'off' while in R2012b, it returned 'on'.
2. I added the following code to slblocks.m:
if (~verLessThan('matlab', '8.4')) % R2014b% Add repository information if not yet donetryload_system('canoelib');if (strcmp(get_param('canoelib', 'EnableLBRepository'), 'off'))set_param('canoelib', 'Lock', 'off');set_param('canoelib', 'EnableLBRepository', 'on');set_param('canoelib', 'Lock', 'on');save_system('canoelib');end;close_system('canoelib');catch exendend;
That worked, but it will fail if MATLAB is installed in C:\Program Files and the user starts it without Admin rights (canoelib.slx will be write-protected in that case).
What I'm looking for is a solution similar to 2., but without saving the configuration. Is there a way to update the repository information for a library in memory by script?
Many thanks in advance, Martin