You are here

Working with model diagrams : Searching for a particular element

Searching for a particular element

Navigating through large or complicated diagrams is made easier by the search facility. This will highlight the element you are looking for, and centre it in the window, if the model diagram extends beyond the window's edges. You can search for components by following connections around the diagram, or using text contained in their caption, equation or description and comments, using the "Find" tool.

The simplest way is to use the two tools provided on the toolbar:

  • "Find" calls up a dialogue box into which you enter the text, and specify which text elements to search
  • "Find Next" searches for successive occurrences of variables satisfying your search criterion

There are two search modes available in the dialog box:

  • According to influence arrows and ghost relations in the model (selected by upper row of buttons)
  • By looking for keywords in the text associated with components (selected by "OK" button)

Elements are searched in order, with the first to match the search conditions being highlighted. If this is not the one you want, or you want to find others that satisfy the same conditions, use the "Find Next" tool. Alternatively, you can choose the commands "Find..." and "Find next" on the Edit menu. "Find Next" will be available to continue to show the results of the last search until a new search is done. If you choose "Find..." from the context menu after right clicking in a submodel, the search will only turn up components within that submodel, even if you choose "Find next" somewhere else.

The description and comments associated with an element are entered using the equation dialogue window, as is the equation itself. The caption (or name) of an element is entered on the model diagram.

Note that the text is not case-sensitive, so "VAR" will mach "var". Note also that the text will match its use anywhere within the text elements searched, so "ar" will match both "car" and "arm". Also note that you cannot put a newline in the search string, as hitting the Return key starts the search. You can instead include \n (backslash-n) in the search string, and this will match a newline in the text being searched for.

Searching equations is a useful way to find where a particular function is used. For example, searching for the text "rand" in equations will find all the elements using the functions "rand_var" and "rand_const".

As well as searching for text, the search system can follow influences around the diagram, even when these come to and from ghosts of the starting point. To use this feature, first select one or more nodes in the diagram, then hit the "Find" button. The dialogue contains a "Follow influences" panel with three buttons, "Components influencing selection", "Components equivalent to selection" and "Components influenced by selection". If you hit the first of these, the selection will be cleared and a component which starts an influence arrow going to a previously selected component will itself be selected. Now you can hit either "Find next" to go to another component that influences the original selection, or "Find" followed by "Components influencing selection" to go to a component influencing the one you just went to. "Components influenced by selection" does the same thing but searches forwards along influences rather than backward, and "Components equivalent to selection" merely finds ghosts of selected components, or bases of selected ghosts.

In: Contents >> Working with model diagrams