Tools

Filter and Navigation Bar

The Filter & Navigation bar makes working in the diagram view easier. The miniature view of the entire workspace allows for the view to be switched to a specific part of the model. Checkboxes allow for components, images, overlay displays and control elements to be hidden temporarily. Filters can be used to display only those model components in the diagram view which meet certain conditions. Besides pre-defined categories, such as a component type’s top-level origin, it is also possible to create user-defined queries for which a component’s name, ident, comment section and type can be accessed by selecting “User-defined filter” from the selection menu. In order to apply a filter, it needs to be selected. “Show all” resets the diagram view and displays all components and other elements in the model again. The Filter & Navigation bar can be shown or hidden from the View menu in the menu bar.

Figure 1: Filter & Navigation bar with filter options

Width and height of the workspace can be adjusted on the Miscellaneous page of the Options dialog. To save the changed settings in the model as well, activate the corresponding checkbox.

Figure 2: Workspace options

Find and Replace

Searching the text view

The search function in the text view allows for searching and replacing components, variables or text sections.

Figure 3: Find and Replace dialog

The option "Match whole word" finds only occurrences of a word that are not part of a larger word. The option "Match case" makes the search case-sensitive. The option "Search up" searches from the current cursor position backwards to the top of the document.

Searching the diagram view

The search function in the diagram view allows the user to find elements and their corresponding references in the active model. The search dialog's title bar shows the name of the active model.

Figure 4: Search dialog in the diagram view

The condition defines the text pattern which is to be compared with the selected element properties.

  • Name: Compares the name (relative to the active mode)
  • Type: Compares the global name of the type
  • Declaration: Compares the global name of the declaration
  • Comment: Compares the comment

Name, type and declaration of the elements in the example model M:


package P
	model T
		Real y;
	end T;
	model M
		T t1(y=1);
		T t2(y=t1.y+1);
	end M;
end P;
Name Type Declaration

t1

P.T

P.M.t1

t1.y

Real

P.T.y

t2 P.T

P.M.t2

t2.y

Real

P.T.y

The example shows an expression t2(y=t1.y+1) that includes a reference to the element t1.y. It is only possible to search for references in modifications. Algorithms and equations are not included. The option "Match whole word" finds only occurrences of a word that are not part of a larger word. The option "Match case" makes the search case-sensitive. The option "Include local types" includes also local into the search. Search results are displayed as a table in the Output Area (tab "Find Results"). The matches are highlighted in bold.

Figure 5: Search results for the diagram view

The table includes a line for each element and reference. For references, the column "Expression" shows the corresponding modification.

Sweeper and Magnet

Sweeper and Magnet can be used to move multiple items in the Diagram View without selecting them.

  1. Select the required tool (Sweeper or Magnet). You can use the buttons and or the corresponding hot keys (see below).

  2. Click with the mouse anywhere in the Diagram View.

  3. Hold down the mouse button and move the mouse around. Depending on the movement`s direction, the view is split horizontally or vertically into an active and an inactive area (gray background). Elements which are entirely placed in the active area can then be pushed with the Sweeper towards the edge or pulled in with the Magnet.

  4. Release the mouse button at the desired position. The action can be cancelled at any time using the ESC key. Elements which have been moved already are then reset to their original position.

Mouse movement

Split Orientation

Sweeper

Magnet

From left to right

Horizontal

Elements right of the mouse cursor can be moved to the right.

Elements left of the mouse cursor can be moved to the right.

From right to left

Horizontal

Elements left of the mouse cursor can be moved to the left.

Elements right of the mouse cursor can be moved to the left.

From top to bottom

Vertical

Elements below the mouse cursor can be moved to the bottom.

Elements above the mouse cursor can be moved to the bottom.

From bottom to top

Vertical

Elements above the mouse cursor can be moved to the top.

Elements below the mouse cursor can be moved to the top.

The hot keys Shift+S(Sweeper) and Shift+M (Magnet) activate the tools. When the operation is finished, the Diagram View reverts to the normal edit mode. When pressing and holding only the corresponding key (S or M), you can perform several actions with the selected tool.