Documentation Center User Guide
|Navigating||Exporting Documentation for Classes|
|Viewing Documentation of Classes|
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 Documentation Center, choose Documentation Center from the Help menu.
Viewing the System Modeler Documentation Center.
The orange tile at the top is the main entry point for beginners to get started with System Modeler itself. The yellow tiles contain documentation for modeling, simulation, analysis and deployment of the created models using System Modeler. Next come the green tiles, which embody documentation on the underlying modeling language, i.e. Modelica and Modelica Standard Library, as well as any bundled and additional libraries. In particular, the Modelica Language tile contains a full copy of the book Modelica by Example by Michael M. Tiller. Finally, the blue and gray tiles on the bottom contain links about the integration of the product with the Wolfram Language and various other resources on Modelica.
The top address bar in 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 Return 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. The find bar will be available at the bottom of the window.
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. The back and forward mouse buttons can be used as well, if available.
The Back and Forward buttons on the toolbar of Documentation Center.
Click the Home button on the toolbar to go back to the front page of Documentation Center.
The Home button on the toolbar of Documentation Center.
When showing class documentation, the top of Documentation Center also contains a hierarchy where you can click any level of the hierarchy to get to the documentation for that level. If you click the level you are currently showing documentation for, which is the rightmost in the hierarchy, that class is opened in a class window.
The page currently viewed in Documentation Center can be sent to the printer by pressing Ctrl+P.
Viewing Documentation of Classes
To get information about classes in the Modelica Standard Library or any other documented class in Model Center, right-click the icon of a class in the Class Browser and choose Class Documentation. It is also possible to get information about classes by right-clicking components in the graphical views or in the component window and choosing Class Documentation from the popup menu, or by pressing F1.
Clicking the Class Documentation button on the toolbar in either Model Center or Simulation Center will show the documentation of the currently active class in the Class Window or Experiment Browser.
Pressing F1 will show the documentation for the currently selected class or component, or the currently active class if none is selected. This works in most views.
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 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 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 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 Documentation Center, while external links are delegated and opened in your system's default web browser.
Exporting Documentation for Classes
Documentation of classes can be exported to HTML. From Documentation Center, this is done by clicking the Share button to the far right inside the top address bar. Choose Save Page 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 ▶ 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 ▶ 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 among 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.
A link to the currently viewed page in Documentation Center can be copied to the clipboard by clicking the Share button inside the top address bar. Select Copy Link from the drop-down menu. A link to an online version of the page can be copied with Copy Link to Online Documentation. To directly open the online version of the current page, click the Open Online Documentation in a Web Browser menu item.