MATLAB: How to display blocks of a custom library in the Simulink library browser

blocksimulink

I have started working on a Simulink library. I followed the instructions provided in MATLAB help and managed to create the library that I wanted. Everything works as it is supposed to, i.e. the library name is displayed in the library browser, I can open it (by right clicking on it), drag the blocks to my models and use them. However, the blocks that are in the library are not displayed in the right hand side of the library browser. Does anyone know how can I possibly display them?

Best Answer

Thank you for your replies. The answer to Ms. Govind's questions are 1). Yes. All of the blocks are subsystems. 2). Yes. They all have masks and all have parameters.
Also, my slblocks function looks like (I tried both 1 and 0 for Browser.IsFlat and also tried deleting the line completely):
function blkStruct = slblocks
% Specify that the product should appear in the library browser
% and be cached in its repository
Browser.Library = 'DrivetrainLibrary.mdl';
Browser.Name = 'Drivetrain Library';
Browser.IsFlat = 1;% Is this library "flat" (i.e. no subsystems)?
blkStruct.Browser = Browser;