Blocks not showing in Simulink Library browser (R2015a)

4 views (last 30 days)
I upgraded from R2014a, and noted that our self-developed libraries are showing empty in the Library browser.
I loaded the library file, then did | set_param(gcs, 'EnableLBRepository', 'on'); | and saved it. I checked by quitting MatLab that after a restart/reload that this property is on, and it was.
I'm using a 'Standard' slblocks.m file next to the .slx library file:
function blkStruct = slblocks
% Specify that the product should appear in the library browser
% and be cached in its repository
Browser.Library = 'CSI_lib';
Browser.Name = 'CSI Library';
blkStruct.Browser = Browser;
After a LB refresh this library is visible in the LB, but when selecting it the right-hand pane doesn't show any of the blocks that are supposed to be in there.

Answers (1)

Sebastian Castro
Sebastian Castro on 16 Apr 2015
I was also able to run into this in R2015a, but it was resolved when I saved the model and refreshed the Library Browser.
The problem is that when you do that set_param command, it doesn’t show the model as “dirty” (that is, with the * next to its name). However, you still have to save it first.
From a command-line perspective, you can do:
slxFile = 'mylibname';
load_system(slxFile);
set_param(slxFile,'Lock','off');
set_param(slxFile,'EnableLBRepository','on');
save_system(slxFile);
- Sebastian

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!