Main Content

getView

Find architecture view

Since R2021a

    Description

    view = getView(model,name) finds the view view in the architecture model model with view name name.

    example

    Examples

    collapse all

    Open the keyless entry system example and create a view, newView.

    openProject("scKeylessEntrySystem");
    model = systemcomposer.loadModel("KeylessEntryArchitecture");
    view = model.createView("newView");

    Open the Architecture Views Gallery to see newView.

    model.openViews
    

    Find the view.

    foundView = model.getView("newView")
    foundView = 
      View with properties:
    
                          Name: 'newView'
                          Root: [1×1 systemcomposer.view.ElementGroup]
                         Model: [1×1 systemcomposer.arch.Model]
                          UUID: 'd43b17fa-244d-4963-8711-0e62868c83d4'
                        Select: []
                       GroupBy: {}
                         Color: '#0072bd'
                   Description: ''
        IncludeReferenceModels: 1
    
    

    Input Arguments

    collapse all

    Architecture model, specified as a systemcomposer.arch.Model object.

    Name of view, specified as a character vector or string.

    Example: "All Components Grouped by Review Status"

    Data Types: char | string

    Output Arguments

    collapse all

    Architecture view found, returned as a systemcomposer.view.View object.

    More About

    collapse all

    Version History

    Introduced in R2021a