To get your library to appear in the Dymola Libraries menu you first need to make sure that your library is saved using the directories method rather than as a single Modelica file. See here for more information.
Create a directory called script inside your library directory and within the script directory, create a text file called libraryinfo.mos. Edit this file using a text editor and add the LibraryInfoMenuCommand. An example of how to use this command is below:
LibraryInfoMenuCommand(category="libraries", text="Hydraulics", reference="HyLib ", isModel=true, description="Hydraulics library", version="2.2.36", ModelicaVersion=">= 2" pos=102);
The arguments in this command have the following meaning:
- Category determines where in the File menu the item will appear, libraries or de-mos.
- text is the text that will appear in the library menu.
- reference is the package name.
- isModel is true if item is a model or library.
- description is a description of the library and will appear at the bottom right of the Dymola window when you put the mouse over the item in the libraries menu.
- version is the version number of the library to be loaded
- ModelicaVersion is used by Dymola to filter the contents of the libraries menu based on the Modelica Standard Library version opened.
- pos sets the position of the library link in the library menu.
For more detailed information refer to Section 6.1.5 in Dymola User Manual Volume 1.
This was written using Dymola 2016 FD01.
Please note that for this to work the library must either be in the <Dymola>ModelicaLibrary directory or within a directory specified in the MODELICAPATH environmental variable.