Main Content

createSubGroup

Create subgroup in element group of view

Since R2021a

    Description

    subGroup = createSubGroup(elementGroup,subGroupName) creates a new subgroup subGroup, named subGroupName within the element group elementGroup of an architecture view.

    Note

    This function cannot be used when a selection query or grouping is defined on the view. To remove the query, run removeQuery.

    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")
    group = 
      ElementGroup with properties:
    
             Name: 'myGroup'
             UUID: '6f348dd3-7338-4f45-8ff4-06fa3af0b7cf'
         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