WOLFRAM SYSTEMMODELER TUTORIAL

Model CenterClass Window

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

Class windows use three views to represent different aspects of a class:

  • Icon View: a graphical view showing the icon layer of the Modelica class. The icon layer makes up the icon of the class when the class is used as a component of another model.
  • Diagram View: a graphical view showing the diagram layer of the Modelica class. The diagram layer represents the composition of a class.
  • Modelica Text View: a view containing the Modelica definition (textual representation) of the Modelica class.

To change the active class window view, choose View Class Window and click the name of the view.

1.gif

Choosing the Diagram View as the active class window view.

It is also possible to change the active class view by using the Icon View, Diagram View, and Modelica Text View buttons on the Class View toolbar.

2.gif

The toolbar buttons for changing the active class view.

The name of the class, along with its class restriction, class view, and file name, is displayed in the active class window below its title. An asterisk immediately to the right of the file name is an indication that changes to the class have been made since it was last saved.

Specifying a Preferred View

The default view of the class window, when a class window is opened, depends on the restriction of the class. For example, the default view of a package is the Icon View, while the default view of a model is the Diagram View. The default view can be overridden by specifying a preferred view as a Modelica annotation within the definition of the class.

An example of a model with an annotation specifying the Icon View as the preferred view is given below.

In order to make the Diagram View the preferred view, use "diagram" instead of "icon"; for the Modelica Text View, use "text"; and to show the documentation of the class when opening the class window, use "info".

To specify a preferred view in a class of your own, switch to the Modelica Text View in the class window and type in the annotation on the line below the name of your class.

Switching between Windows

It is possible to have several class windows open at the same time. A list of open class windows is found in the Window menu. By clicking one of the window titles in the menu, the window will become the active class window.

A more convenient way of switching between open class windows is to use the Ctrl+Tab and Ctrl+Shift+Tab combination of keys. A list of all open class windows appears as soon as Tab is pressed with Ctrl down.

3.gif

Selecting an active class window using the class window switcher.

The list of windows is kept in an order with the most recently used window at the top. While Ctrl is down, Tab may be pressed and released repeatedly, combined with Shift if desired, to cycle through the list of windows. The window list remains open until Ctrl is released.

If Model Center is configured to use a tabbed document interface (TDI), the tabs below the toolbar can also be used to switch between open class windows. See this section for more information on document interfaces.

Arranging the Windows

If you have more than one class window open you can view all windows at the same time. To display the windows side-by-side, choose Tile from the Window menu. To arrange the windows so that the title bar of every window is visible, choose Cascade from the Window menu.

Note that this is only possible if the model editor is set to use the multiple document interface (MDI). If the model editor is set to use the tabbed document interface (TDI), the order of the tabs below the toolbar can be rearranged by dragging the tabs with the mouse. See this section for more information on document interfaces.

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