Main Content

getSubGroup

Get subgroup in element group of view

Since R2021a

    Description

    subGroup = getSubGroup(elementGroup,subGroupName) gets a subgroup, subGroup, named subGroupName within the element group elementGroup of an architecture view.

    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 the new view newView.

    model.openViews
    

    Create a subgroup myGroup.

    group = view.Root.createSubGroup("myGroup");

    Get the subgroup myGroup.

    getGroup = view.Root.getSubGroup("myGroup")
    getGroup = 
      ElementGroup with properties:
    
             Name: 'myGroup'
             UUID: '0c07b5da-3725-4bfc-b371-743438bae428'
         Elements: []
        SubGroups: [0×0 systemcomposer.view.ElementGroup]
    
    

    Input Arguments

    collapse all

    Element group for view, specified as a systemcomposer.view.ElementGroup object.

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

    Example: "myGroup"

    Data Types: char | string

    Output Arguments

    collapse all

    Subgroup, returned as a systemcomposer.view.ElementGroup object.

    More About

    collapse all

    Version History

    Introduced in R2021a