I am developing a Simulink library that includes several custom subsystem blocks. When I open the library in the Simulink Library Browser, then each subsystem is displayed as a sublibrary. As a concrete example, see the screenshot below. The Hybrid Equations Toolbox has a sublibrary called "Cyber Pysical Systems" and, within, are several subsystems "ADC", "FSM", etc. I want these to be displayed only as blocks within "Cyber Physical Systems" and not as sublibraries themselves. Users shouldn't, for example, see the "flow map f" block in the Library Browser (nor any of the other blocks inside "ADC"). How do I do this? We need the solution to be compatible from R2014b onwards.
Asked
Active
Viewed 540 times
0
-
Cost posted on MATLAB Answers: https://www.mathworks.com/matlabcentral/answers/1706005-in-a-simulink-library-how-to-flag-a-subsystem-as-a-block-and-not-a-sublibrary – Paul Wintz Apr 27 '22 at 02:39
-
1Did you see this answer on the mathworks site? I think this was how I solved the problem https://www.mathworks.com/matlabcentral/answers/101698-how-do-i-add-custom-libraries-as-a-tree-structure-without-spilling-its-contents-and-how-do-i-add-des – scotty3785 May 03 '22 at 11:19
-
I did not, but that looks like exactly what I need! – Paul Wintz May 03 '22 at 20:01
2 Answers
0
I've found that the following process causes the subsystem not to be shown as a sublibrary in the Library Browser.
- Select the subsystem, right-click and select Mask > Edit Mask (Ctrl+M)
- Open the Parameters & Dialogs tab
- Click one of the controls in the left column to add a control to the dialog.
- Click "Apply"
- Delete the added control.
- Click "OK" to close.
- Save the library.
- Open the Library Browser and refresh.
This doesn't seem like "correct" behavior, but it solves my problem.

Paul Wintz
- 2,542
- 1
- 19
- 33
0
For me this happens because the subsystem contains a block that is not fully connected(meaning it has an open signal not connected to anything). Removing these blocks or terminating the open signals(terminator block) works in this case.

Bossel
- 1