Documentation Center

  • Trial Software
  • Product Updates

Control Model Explorer Contents Using Views

Using Views

What Is a Column View?

A view in the Model Explorer is a named set of properties.

The Model Explorer uses views to specify sets of property columns to display in the Contents pane.

For each kind of node in the Model Hierarchy pane, certain properties are most relevant for the objects displayed in the Contents pane. For example, for a Simulink® model node, such as a model or subsystem, some properties that are useful to display include:

  • BlockType (block type)

  • OutDataTypeStr (output data type)

  • OutMin (minimum value for the block output)

Generally, a column view does not contain the total set of properties for all the objects in a node. Specifying a subset of properties to display can streamline the task of exploring and editing model and chart object properties and increase the density of the data displayed in the Contents pane.

What You Can Capture in a View

You can use a view to capture the following characteristics of the model information to show in the Model Explorer:

Use Standard Views or Customized Views

You can use views in the following ways:

  • Use the standard views shipped with the Model Explorer

  • Customize the standard views

  • Create your own views

Automatically Applied Views

The first time you open the Model Explorer, the software automatically applies one of the standard views to the node you select in the Model Hierarchy pane. The Model Explorer applies a view based on the kind of node you select.

The Model Explorer assigns one of four categories of nodes in the Model Hierarchy pane. The Model Explorer initially associates a default view with each node category. The four node categories are:

Node CategoryKinds of Hierarchy Nodes IncludedInitial Associated View
SimulinkModels, subsystems, and root level modelsBlock Data Types
WorkspaceBase and model workspace objectsData Objects
Stateflow®Stateflow charts and statesStateflow
Other

Objects that do not fit into one of the first three categories; for example, configuration sets

Default

The Column View field at the top of the Contents pane displays the view that the Model Explorer is currently using.

If you select a view.  In the Contents pane, from the Column View list, you can select a different view. If you select a different view, then the Model Explorer associates that view with the category of the current node. For example, suppose the selected node in the Model Hierarchy pane is a Simulink model, and the current view is Data Objects. If you change the view to Signals, then when you select another Simulink model node, the Model Explorer uses the Signals view. See Selecting a View Manually.

Selecting a View Manually

By default, the Model Explorer automatically applies a view, based on the category of node that you select and the last view used for that node. You can manually select a view from the Column View list that better meets your current task.

You can shift from the default mode of having the Model Explorer automatically apply views to a mode in which you must manually select a view to change views.

To enable the manual view selection mode:

  1. Select View > Column View > Manage Views.

    The View Manager dialog box opens.

  2. In the View Manager dialog box, click the Options button and clear Change View Automatically.

In the manual view selection mode, if you switch to a different kind of node in the Model Hierarchy pane that has a different view associated with it, the Contents pane displays a yellow informational bar suggesting a view to use.

Tip interface.  The tip interface appears immediately above the object property table.

The tip does not appear if you use automatic view selection.

To hide the currently displayed tip, from the menu button on the right-hand side of the tip bar, select Hide This Tip.

The tip interface displays a link for changing the current view to a suggested view. To choose the suggested view displayed in the tip bar, click the link.

Initially, the suggested view is the default view associated with a node. If you associate a different view with a node category, then the tip suggests the most recently selected view when you select similar nodes.

To change from manual specification of views to automatic specification, from the tip interface, select the down arrow and then the Change View Automatically menu item.

Customizing Views

If a standard view does not meet your needs, you can either modify the view or create a new view.

You can customize the object property table represented by the current view in several ways, as described in these sections:

How the Model Explorer Saves Your Customizations

As you modify the object property table, you change the current view definition.

The Model Explorer saves the following changes to the object property table as part of the column view definition:

  • Grouping by property

  • Sorting in a column

  • Changing the order of property columns

  • Adding a property column

  • Hiding and removing property columns

When you change from one view to another view, the Model Explorer saves any customizations that you have made to the previous view.

For example, suppose you use the Block Data Types view and you remove the LockScale property column. If you then switch to use the Data Objects view, and later use the Block Data Types view again, the Block Data Types view no longer includes the LockScale column that you deleted.

At the end of a Simulink session, the Model Explorer saves the view customizations that you made during that session. When you reopen the Model Explorer, Simulink uses the customized view, reflecting any changes that you made to the view in the previous session.

Managing Views

If a standard view does not meet your needs, you can either modify the view or create a new view. See Customizing Views.

You can manage views (for example, create a new view or export a view) using the View Manager dialog box.

Opening the View Manager Dialog Box

To open the View Manager dialog box, select the Manage Views option from either:

  • The View > Column View menu

  • The options listed when you click the Options button in the column view details section

The View Manager dialog box displays a list of defined views and provides tools for you to manage views.

You can manage views in several ways, including:

Creating a New View

To create a new view that has a new name, you can use one of these approaches:

  • Copy an existing view, rename it, and customize the view.

  • Create a completely new view.

After you create a new view, you can customize the view as described in Customizing Views.

Copying and renaming an existing view.  You can build a new view by copying an existing view, renaming it, and optionally customizing the renamed view. In the View Manager dialog box:

  1. Select the view that you want to use as the starting point for your new view.

  2. Click the Copy button.

    A new row appears at the bottom of the View Manager table of views. The new row contains the name of the view you copied, followed by a number in parentheses. For example, if you copy the Stateflow view, the initial name of the copied view is Stateflow (1).

Creating a completely new view.  To create a completely view, in the View Manager dialog box, click the New button. A new view row appears at the bottom of the View Manager dialog box list of views.

Naming and describing a new view.  Once you create a view, you can name the view and provide a description of the view:

  1. Double-click New View in the left column of the table of views and replace the text with a name for the view.

  2. Double-click Description in the table and replace the text with a description of the view.

  3. Click OK.

Deleting Views

To delete a view from the Column View list of views:

  1. In the View Manager dialog box, select one or more views that you want to remove from the list.

  2. Click the Delete button or the Delete key.

  3. Click OK.

Deleting a view using the View Manager dialog box permanently deletes that view from the Model Explorer interface.

If you think you or someone else might want to use a view again, consider exporting the view before you delete it (see Exporting Views).

Reordering Views

To change the position of a view in the Column View list, in the View Manager dialog box:

  1. Select one or more views that you wish to move up or down one row in the table of views.

  2. Click the up or down arrow buttons to the right of the table of views. Repeat this step until the view appears where you want it to be in the table.

  3. Click OK.

Exporting Views

To export views that you or others can then import, in the View Manager dialog box:

  1. In the View Manager dialog box, select one or more views that you want to export.

  2. Click the Export button.

    An Export Views dialog box opens, with check marks next to the views that you selected.

  3. Click OK.

    An Export to File Name dialog box opens.

  4. Navigate to the folder to which you want to export the view.

    By default, the Model Explorer exports views to the MATLAB® current folder.

  5. Specify the file name for the exported view.

    The file format is .mat.

  6. Click OK.

Importing Views

To import view files from another location for use by the Model Explorer:

  1. In the View Manager dialog box, click the Import button.

    The Select .mat File to Import dialog box opens.

  2. Navigate to the folder from which you want to import the view.

  3. Select the MAT-file containing the view that you want to import and then click Open.

    A confirmation dialog box opens. Click OK to import the view.

The imported view appears at the bottom of the Column View list of views.

The Model Explorer automatically renames the view if a name conflict occurs.

Resetting Views to Factory Settings

You can reset (restore) the original definition of a specific standard view (that is, a view shipped with the Model Explorer) if that view is the current view. To do so, click the Options button in the column view details section and select Reset This View to Factory Settings.

To reset the factory settings for all standard views in one step, in the View Manager dialog box, click the Options button and select Reset All Views to Factory Settings.

    Note:   When you reset all views, the Model Explorer removes all the custom views you have created. Before you reset views to factory settings, export any views that you will want to use in the future.

Was this topic helpful?