Browsing models

Opening a model file

To view a Simulink model, you have to open the model file. YAKINDU Model Viewer recognizes and opens model files with the filename extensions .mdl or .slx. To open a model file, proceed as follows:

  • Click on the button "open model" button or select File → Open File… in the main menu. A file selection dialog appears.
  • Use the file selection dialog to navigate to the model file you want to open and select it.
  • YAKINDU Model Viewer opens the model file and displays its contents in the main view.

On Microsoft Windows, you have two additional options:

  • Double-click on the model file in the Windows Explorer. YAKINDU Model Viewer will open the model file. If YAKINDU Model Viewer is not yet running, it will start up.
  • Drag the model file from the Windows Explorer and drop it into an already open YAKINDU Model Viewer application window. YAKINDU Model Viewer will open the model file.

If you want to open a model file that you have opened recently already, you might be lucky and find it down in the main menu bar’s File menu. YAKINDU Model Viewer records the most-recently files there.

You can view multiple models at the same time. Just open another model file as described. It will be displayed in an additional tab of the main view.

The workbench

The screenshot in figure "The YAKINDU Model Viewer workbench" shows the main user interface components:

The YAKINDU Model Viewer workbench

The YAKINDU Model Viewer workbench

The workbench consists of separate components, so-called views. You can resize, rearrange, minimize, maximize, and even close or open them as you see fit. To do so, drag the horizontal or vertical separators between views, drag a view’s title to a new location, or use a view’s toolbar items. Please find more information in section "Views".

The individual views will be explained in the subsequent sections.

YAKINDU Model Viewer provides three additional buttons to the standard Eclipse toolbar at the top of the window:

  • button "open help" to open the YAKINDU Model Viewer documentation
  • button "open model" to open a model file
  • button "open welcome" to open the YAKINDU Model Viewer Welcome page

Panning the diagram

If the model is too large to fit into the main view, the latter displays only a part of it. You can pan the diagram to bring those parts of the model you want to focus on into the viewport.

Dragging the diagram in the main view

  • Click into the main view.
  • Keep the (left) mouse button pressed.
  • Drag the mouse into the direction you want to pan the diagram. The diagram will follow.
  • When you are done, release the mouse button.

The main view

The main view

Moving the diagram using the main view’s scrollbar sliders

  • Use the main view’s scrollbar slider right from the model diagram to scroll vertically.
  • Use the main view’s scrollbar slider below the model diagram to scroll horizontally.

A scrollbar slider will appear only if needed.

Panning the diagram using the overview

Move the diagram’s viewport by dragging the blue rectangle in the Overview view. The Overview is marked with an orange rectangle in figure "The YAKINDU Model Viewer workbench". You will find details on using the Overview in section "The Overview view" .

Zooming the diagram

You have several options for zooming the diagram:

  • Use the [Ctrl +] key combination to zoom into the diagram; use [Ctrl -] to zoom out.
  • Hold down the (left) [Ctrl] key and turn your mouse' scroll wheel forward to zoom in; turn it backwards to zoom out.
  • Set the zoom factor explicitly by typing the desired value into the corresponding text field and hitting [Return]. The zoom factor field is highlighted in figure "Setting the zoom factor".

Setting the zoom factor

Setting the zoom factor

Double-clicking to navigate in and out

Navigating the system hierarchy is easy:

  • To navigate into a subsystem, just double-click on it. The contents of the subsystem will become visible in the main view. For example, see figure "Navigating the system hierarchy": In the top-left view, the user double-clicks on the collision avoidance subsystem. Follow the red arrow to see the main view change to displaying the opened subsystem.
  • To move back to the containing system, double-click on the main view’s background; see the green arrows in figure "Navigating the system hierarchy". Alternatively, you can use the breadcrumbs to navigate upwards in the hierarchy. This way you can jump multiple hierarchy levels at once.

Navigating the system hierarchy

Navigating the system hierarchy

Previewing subsystems and input/output elements

Hover with the mouse pointer over a subsystem, input, or output, or click on one of these elements once to get a preview of it. For example, in figure "Previewing a subsystem", the user has moved the mouse pointer over the collision avoidance subsystem (top-left). YAKINDU Model Viewer immediately displays a preview of that block at the lower right of element. The same holds true for figure "Previewing an input", where the user has clicked on input number 1. A preview of the containing block is displayed.

Previewing a subsystem

Previewing a subsystem

Previewing an input

Previewing an input

At the top of the main view you can see the breadcrumbs trail. It shows the navigation path from the outer model element to the one that your are currently viewing. You can click on any path element (“breadcrumb”) to directly navigate to it.

Figure "Breadcrumbs" shows a breadcrumbs trail that is three levels deep. See also figure "The YAKINDU Model Viewer workbench" where the breadcrumbs trail marked by a blue rectangle.

Breadcrumbs

Breadcrumbs

The Overview view

The Overview view displays a reduced version of the complete model. In figure "The YAKINDU Model Viewer workbench", you can find it in the top-left corner, marked with an orange rectangle.

If the model is larger than the main view’s viewport, a blue rectangular underlay appears in the overview. It highlights that part of the model that is currently visible in the main view. You can drag the underlay across the model to reposition the main view’s viewport to the model region you want to focus on.

  • Click at the blue underlay in the overview.
  • Keep the (left) mouse button pressed.
  • Drag the mouse into the direction you want to pan the diagram. The diagram in the main window will follow.
  • When you are done, release the mouse button.

The overview

The overview

The overview’s Preserve ratio button controls the overview’s appearance. If the button is pressed, the blue underlay maintains the same display proportions as the main view, and the model elements are scaled in proper proportion. If the Preserve ratio button is not pressed, however, the overview’s area is maxed out an the model image in the overview is scaled up to completely fill the available space. This feature is useful for models that are stretched extremely wide on one of the axes and might help to spot more details in the minified model version. On the other hand, model elements are scaled out of proportion – it’s up to you to decide.

The Outline view

The Outline view displays a hierarchical tree view of the model and its elements. In figure "The YAKINDU Model Viewer workbench", you can find it in the lower-left corner, marked with a green rectangle.

You can expand an element and make its children visible by clicking on the little hollow triangle in front of the element’s name. Click on the (now filled) triangle again to hide the element’s children. Figure "The outline view" shows an outline with one opened and one closed element.

Clicking on a subsystem or chart element in the outline opens that element in the main view. The element’s properties are shown in the properties view.

The outline view

The outline view

Using the browsing history

YAKINDU Model Viewer maintains a history of your navigation in the model and remembers which model elements you have visited and in which sequence. You can use the "backward" button to navigate back in your navigation history and the "forward" button to move forward.

The browsing history buttons

The browsing history buttons

Opening in a separate tab

You can open additional model files without having to close the current one. Each model will be displayed in a separate tab of the main view.

You can switch back and forth between tabs by clicking on them.

To close a tab, click on its button "close" resp. button "close" highlighted button.

Please note: It is also possible to open a subsystem of the current model in an additional tab, see section "Adding diagram views in new tabs".

Linking libraries

If a subsystem is located in a different model file (“library”) and referenced from the current one, YAKINDU Model Viewer must know where to find the library in order to display that subsystem correctly or to navigate to it. YAKINDU Model Viewer supports an automatic lookup mechanism plus a manual one for those cases not covered by the automatic library lookup.

Automatic library lookup

Typically, your library files will reside somewhere “near” your model file, for instance in the same folder, in the parent folder, or in a sibling or child folder. YAKINDU Model Viewer will search directories “near” your model directory automatically. By default, it does so by going two folder levels up and then searches all subfolders of that directory for the needed library, up to a depth of six directory levels.

Let’s consider an example and assume your model is in some/cool/devices/soapbox/brakes.mdl and references an object in MyLibrary, which has to be resolved. Going up two levels in the file system hierarchy means to go to the some/cool directory. Starting here, YAKINDU Model Viewer searches this directory and all its descendant directories for the files MyLibrary.mdl and MyLibrary.slx. For example, if there is a file some/cool/devices/libraries/MyLibraries.mdl, YAKINDU Model Viewer will find it. However, if MyLibraries.mdl resides in some/cool/devices/libraries/a/b/c/d/e, it won’t be found, because the subdirectory depth is limited to six; at least that’s the default.

You can change the default settings in the preferences. For example, to instruct YAKINDU Model Viewer to go up only one directory level and restrict the subdirectory search to a depth of three, do the following:

  • In the main menu, select Window → Preferences. The Preferences dialog appears.
  • In the navigation area on the left, select YAKINDU Model Viewer.
  • Enter the value 1 into the Number of parent directories searched for libraries field.
  • Enter the value 3 into the Number of sub-directories searched for libraries field.
  • Click on the OK button.

Setting the library search preferences

Setting the library search preferences

Setting both fields to 0 restricts the automatic library search to the directory the model resides in.

Manual library lookup

If your library is out of the range of the automatic library lookup mechanism and you can’t or won’t change the preferences, you can still manually point YAKINDU Model Viewer to the library file.

Figure "Manual library lookup [1]" shows a model that references a subsystem named RefSubsystem. This subsystem is defined elsewhere, denoted by the chain symbol in the lower left of the subsystem rectangle. However, the subsystem definition cannot be found. It is thus represented by a red, dashed rectangle that is labeled “Bad Link”.

Manual library lookup [1]

Manual library lookup [1]

To resolve the “bad link”, double-click on RefSubsystem. A file selection dialog will appear (not shown here). Navigate to the library file and select it.

Please note: By default, the file selector looks for a library file with the extension .mdl. If your library is an .slx file, you might have to toggle the settings in the file selection dialog in order to be able to see and select that file.

After selecting the library file, YAKINDU Model Viewer loads the element and displays it in the main view:

Manual library lookup [2]

Manual library lookup [2]

Going up one level again, the model no longer shows a bad link, but rather the resolved element:

Manual library lookup [3]

Manual library lookup [3]