主要内容

simulink.dashboard.switchPanelTab

Switch dashboard panel tab

Since R2026a

Description

simulink.dashboard.switchPanelTab(model,tabName) switches the tab a dashboard panel displays to the tab you specify. To use the function, the model you specify must be open. Loading the model is not sufficient.

example

simulink.dashboard.switchPanelTab(model,tabName,selectTab) switches to the tab you specify and selects the tab. To use the function, the model you specify must be open.

Examples

collapse all

Open this example modeling a car dashboard.

openExample("simulink/CreateARealisticDashboardUsingTheCustomGaugeBlockExample")

The panel in this example displays the tab named Vehicle Maneuver. Switch to the tab named Dashboard.

simulink.dashboard.switchPanelTab(bdroot,"Dashboard")

Switch back to the tab named Vehicle Maneuver and select the tab.

simulink.dashboard.switchPanelTab(bdroot,"Vehicle Maneuver",true)

Input Arguments

collapse all

Handle or name of the top-level model containing the tab to which you want to switch. Specify the handle as a scalar. Specify the name as a string or character array. For information about how to get model handles, see Get Handles and Paths.

Example: "myModel"

Name of the tab to which you want to switch, specified as a string or character array.

Example: "My Panel Tab"

Option to select the tab to which you switch, specified as logicals. By default, the tab is not selected. To select the tab, specify true or 1.

Example: true

Version History

Introduced in R2026a