How do I add a custom library to the Simulink Library Browser in Simulink 4.1(R12.1)?

46 views (last 30 days)
I have created a custom library in Simulink 4.1(R12.1) and would like to add it to the Simulink Library Browser.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Dec 2021
Edited: MathWorks Support Team on 30 Dec 2021
The ability to add custom libraries to the Simulink Library Browser is available in Simulink 4.1(R12.1). Refer to the documentation link below for more information.
In particular, refer to the "Create Block Libraries" and "Add Libraries to the Library Browser" sections in the documentation.
The 'slblocks.m' files shipped with Simulink are commented and explain the necessary modifications. You can view one of these files by typing the following at the MATLAB command prompt:
edit slblocks
Follow the instructions outlined in the 'slblocks.m' file and make changes which apply to your custom library.
Here are the general steps to follow:
1. Place each custom library within its own directory.
2. Copy the 'slblocks.m'file into each directory that has one of your libraries. This file is present at the following location.
where $MATLABROOT is the directory where MATLAB is installed and can be known by executing the following command at the MATLAB Comamnd Prompt.
3. In order to add these directories with the custom libraries to the MATLAB path and save them, execute the following commands.
4. Make sure that the MATLAB path includes the path to these directories. You can execute the following command at the MATLAB command prompt to find out what directories are on your path.
5. Make sure that the name of the customized file is also saved as 'slblocks.m'.
Jan on 12 Jan 2018
@Victor: "Adding a custom library to the Simulink Library Browser in Simulink 4.1(R12.1)" is a very specific task and it requires some experiences to understand it. I think, you need a certain expert level to reconsider this and "layman terms" are not as clear as using the standard terms of Matlab and Simulink.
Do you have a question to a specific sentence? If so, posting them in the comments would be useful.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!