Main Content

simulink.dashboard.isDashboardBlock

Check whether block is dashboard block

Since R2026a

Description

tf = simulink.dashboard.isDashboardBlock(block) checks whether the block you specify is a dashboard block. A dashboard block is a block from the Dashboard library (including the Customizable Blocks sublibrary) or the Aerospace Blockset™ library.

example

Examples

collapse all

Create a new model. In the MATLAB® Command Window, enter this command.

new_system("myModel");

Open the model.

open_system("myModel");

Add a Half Gauge block from the Customizable Blocks library to the model. In the command window, enter this command. h is the handle of the new block.

h = add_block("simulink_hmi_customizable_blocks/Half Gauge","myModel/myBlock")

Check whether the new block is a dashboard block.

simulink.dashboard.isDashboardBlock(h)
ans =
  logical
   1

The output of 1 indicates that the new block is a dashboard block.

Input Arguments

collapse all

Block you want to check, specified as a block handle or block path. Specify the handle as a scalar. Specify the name as a string or character array. For information about how to get handles and paths, see Get Handles and Paths.

Example: "myBlock"

Output Arguments

collapse all

True or false result, returned as a 1 or 0 of data type logical.

  • 1 (true) — The block is a dashboard block.

  • 0 (false) — The block is not a dashboard block.

Version History

Introduced in R2026a