Main Content

setActiveTab

R2026b

Specify active Simulation Data Inspector tab

Since R2026b

    Description

    setActiveTab(tabObj) sets the tab corresponding to the Simulink.sdi.Tab object tabObj as the visible tab in the Simulation Data Inspector.

    To query which tab is currently active, use getActiveTab.

    example

    Examples

    collapse all

    To programmatically switch which tab is visible in the Simulation Data Inspector, use setActiveTab. For example, to display the visualizations on the third tab from the left in the Simulation Data Inspector, get the Simulink.sdi.Tab object corresponding to the third tab in the Simulation Data Inspector. Then, set that tab as active.

    tabGroup = Simulink.sdi.TabGroup;
    tab3 = getTabByIndex(tabGroup,3);
    setActiveTab(tab3)

    Input Arguments

    collapse all

    Tab to set as active, specified as a Simulink.sdi.Tab object.

    Version History

    Introduced in R2026b