Wolfram Computation Meets Knowledge

Documentation Center

Viewing Documentation of ClassesDocumenting Classes
NavigatingRetrieving Links
Exporting Documentation for Classes

Introduction | Class Browser | Class Window | Graphical Views | Modelica Text View | Component Browser | Variable Views | Reliability View | Messages View | Kernel Command View | Documentation Center | Functional Mock-up Interface | Keyboard Shortcuts | Kernel Commands

The Documentation Center is used to browse the System Modeler documentation and library documentation, as well as browse and edit the embedded documentation of classes. To open the Documentation Center, choose Documentation Center from the Help menu.


Viewing the System Modeler Documentation Center.

The red tiles at the top contain documentation on System Modeler itself. The blue tiles contain documentation for the Modelica Standard Library, as well as documentation for any installed libraries. The yellow tiles contain links to various other resources to learn more about the product and the underlying modeling language, Modelica. The Modelica Language tile contains a full copy of the book Modelica by Example by Michael M. Tiller.


The top address bar in the Documentation Center also functions as a search bar, allowing you to search in the System Modeler documentation and the Modelica by Example book, as well as in the embedded documentation of the libraries shipped with the product. Search by entering your search term and press Enter or click the Search button to the right of the search bar.

To find text on the currently viewed page, use the find bar accessible by pressing Ctrl+F.

Viewing Documentation of Classes

To get information about classes in the Modelica Standard Library or any other documented class, right-click on the icon of a class in the Class Browser and choose View Documentation. Clicking the View Documentation button on the toolbar will show the documentation of the class in the active class window. It is also possible to get information about classes by right-clicking components in the graphical views or in the component window and choosing View Documentation from the popup menu.

When viewing the documentation of an example model, a diagram will be shown. Click this diagram to open Simulation Center and simulate the model.


The Documentation Center keeps a record of all viewed pages. It is possible to go back and forth in this history of visited pages by clicking the Back and Forward buttons on the toolbar or by choosing a specific page in the drop-down list of the browser. The back and forward mouse buttons can be used as well, if available.

Click the Home button on the toolbar to go back to the front page of the Documentation Center.

When showing class documentation, the top of the Documentation Center also contains a hierarchy where you can click on any level of the hierarchy to get to the documentation for that level. If you click on the level you are currently showing documentation for, which is the rightmost in the hierarchy, that class is opened in a class window.

Exporting Documentation for Classes

Documentation of classes can be exported to HTML. From the Documentation Center, this is done from the File menu. Choose Save as HTML to bring up the Documentation Generator dialog.

The Documentation Generator is also accessible from the main window of Model Center and the Class Browser. To export the documentation of the class of the currently active Class Window, choose File Export Export Class Documentation as HTML from the main window menu. In the class browser, you can right-click any class whose documentation you want to export and choose Export Export Class Documentation as HTML from the context menu.

The Documentation Generator dialog lets you specify the output directory for the HTML documentation. If your classes use components from other libraries, you can choose to generate links to the documentation pages of these libraries. The documentation for any linked or referenced external libraries will not automatically be generated, but once generated, the links will allow you to navigate between the pages of different libraries. For the links to work, documentation of all interlinked libraries must be generated in the same output directory, or at a later time copied to the same parent directory.


Exporting the documentation of the BioChem library to HTML.

The documentation generator is recursive and will generate the documentation for the target class and all of its child classes. This makes it just as easy to generate the documentation for an entire library as for a single example model or component. Note, however, that the generator will never generate documentation for a class at a higher hierarchical level than the level of the target class. This usually means that if only the documentation for a single example model is generated, the components of the model will not be linked to in the generated documentation page of the model if the components are located in another branch of the library.


The page currently viewed in the Documentation Center can be sent to the printer by pressing Ctrl+P.

Documenting Classes

The documentation for a class consists of information embedded in the class as an annotation (the information and revisions sections) as well as information that is autogenerated by System Modeler, including information about parameters, variables, constants, and components. The documentation provided by annotations can be edited using the edit mode of the Documentation Center. While viewing the page you want to edit in the browser, click the Edit button on the toolbar to switch to edit mode; clicking it again will take you back to view mode, where you can see the results of your changes. Note that the edit mode is disabled for read-only classes as these cannot be edited.


The Edit button on the toolbar of the Documentation Center.

The default documentation editor is a what you see is what you get (WYSIWYG) editor that lets you edit the information section of the documentation in an environment similar to that of a word processor.


Editing the embedded documentation of a class in the WYSIWYG editor.

The format of the embedded documentation is standard HTML. If you are familiar with HTML, or if you require more control than what is provided by the WYSIWYG editor, you may want to switch to the HTML editor. This is done by clicking the arrow of the Edit button and choosing Edit Information in HTML editor from the drop-down menu for the Information section or Edit Revisions in HTML editor for the Revisions section.


Switching to the HTML editor.

The HTML editor lets you edit the documentation in plain HTML. You may switch back and forth between the editors as well as the editing of the Information and Revisions sections at any time by using the drop-down menu of the Edit button.


Editing the embedded documentation of a class in the HTML editor.

Images in the documentation

If you include images in your documentation, supported image formats include BMP, GIF, JPEG, PNG and WebP. The Modelica URL protocol (modelica://) is the preferred protocol for referencing image files in HTML. To be able to use a Modelica URL, the Modelica class must first be saved to a *.mo file and the images to include must be possible to reference using a path relative to that *.mo file.

While the WYSIWYG editor provides a dialog for adding images, the HTML editor makes it even easier by accepting images to be dropped or pasted on the editor. A HTML img tag will then automatically be created with a valid Modelica URL referencing the image.

Links in the documentation

To create links to the documentation of another Modelica class, format the URL as modelica:// followed by the name of the Modelica class. You can also create links that will open a class window for the specified class. This is done by adding a hash sign (#) and the name of the view to the link. For instance, the link modelica://Modelica.Math.asin#diagram will show the Diagram View of the Modelica.Math.asin class when clicked.

Modelica links (links that start with modelica://) are handled by the Documentation Center, while external links are delegated and opened in your system's default web browser.

Retrieving Links

A link to the currently viewed page in the Documentation Center can be copied to the clipboard through Edit Copy URL. A link to an online version of the page can be copied with Copy Web URL. To directly open the online version of the current page, use the Go To Web URL menu item.

Introduction | Class Browser | Class Window | Graphical Views | Modelica Text View | Component Browser | Variable Views | Reliability View | Messages View | Kernel Command View | Documentation Center | Functional Mock-up Interface | Keyboard Shortcuts | Kernel Commands