MATLAB: Displaying a user-defined library in the simulink library browser

library browser

Hello,
I believe this question is simple and I am just misinterpretting something in the documentation. I have created my own library called PackNTxLib. I would like to add it to the Library Browser. I followed the product documentation and it isn't working so I must have misinterpreted something in the documentation. I did the following: 1. Under My MatLab directory (i.e. My Documents/<myusername>/MatLab) I created a folder called PackNTxLib. 2. In that folder I added my model library (PackNTxLib.mdl) 3. In that folder I created an slblock.m file that contains the following: function blkStruct = slblocks Browser.Library = 'PackNTxLib'; Browser.Name = 'Pack N Transmit'; blkStruct.Browser = Browser;
I have run the file and get no errors. Then I bring up the simulink library browser and my library isn't there. Am I supposed to look somewhere else? Am I missing something in my .m file? Do I have my folder in the wrong place? I figure this is something simple I am doing wrong. Thanks!

Best Answer

Have you added My Documents/<myusername>/MatLab/PackNTxLib to the MATLAB path? Once you have done that, run:
which -all slblocks
And make sure that your slblocks.m shows up in the list.