Create Architecture Views Interactively

Typically, the structural hierarchy of a system differs from the hierarchy of the functional requirements. With architecture views, you can sketch the system based on different hierarchies. For example, you can author a system using the requirements. This allows you to better understand what components you need to satisfy your requirements while not necessarily focusing on the structure.

You can create an architecture view interactively. This example uses the architecture model for an unmanned aerial vehicle (UAV), scExampleSmallUAV, to create filtered and free form views. The view created shows the components having an interface for the light commands.

Create Filtered Views

To create a filtered view:

  1. In the MATLAB® command window, enter scExampleSmallUAV. The architecture model opens in the Simulink Editor.

  2. In the Views section, click Architecture Views to open the Architecture Views Editor.

    Views editor to create a new view.

  3. Click New View to open a Create View dialog box.

  4. In the Name box, enter a name for this view. For example, light_command_view.

  5. Select Create and observe that a new view is created.

    New view called 'light command view'.

  6. In the View Filter pane, select Add Default to add a new form-based criteria to the filter.

  7. From the Select drop-down list, select Components with a port which have an interface. From the Where drop-down list, select Name, and in the text box, enter the name of an interface in the architecture model. For example, enter lightCmd.

    View filter query display.

  8. Click Apply Query. The dialog box closes and an architecture view is created using the query from the Filter box. The view is filtered to select all the components for which the lightCmd interface is applied.

    Updated view after applying query.

Create Freeform Views

You can also create a freeform custom view without using a filter.

  1. Click New View.

  2. In the Name box, enter a name for this view. For example, use light_command_view_freeform. From the drop-down menu, select Freeform View. Select Create.

    Create view dialog with Freeform View option.

  3. To add components to the view, drag and drop components from the Model Components. Drag and drop Airframe, Fuselage, and Payload components to your model. Alternatively, you can use the keyboard shortcut Ctrl+I to add component instantiations to your view.

    Freeform view display on view editor.

    You can use the keyboard shortcut Delete to delete components from the view.

  4. Observe that the free form view is created.

    Full freeform view.

  5. To group components, select (press Shift and click) the Airframe and Payload components and then the Group.

    Grouped freeform view.

    To ungroup components, select the components and click Ungroup.

  6. Switch between the light_command_view_freeform and light_command_view by selecting the desired view from the View Browser.

    Switching back to the 'light command view'.