Main Content

getWorkspaceVariables

Class: Simulink.Mask
Package: Simulink

Get all the variables defined in the mask workspace for a masked block

Syntax

p = Simulink.Mask.get(blockName)
vars = p.getWorkspaceVariables

Description

p = Simulink.Mask.get(blockName) gets the mask on the block specified by blockName as a mask object.

vars = p.getWorkspaceVariables returns as a structure all the variables defined in the mask workspace for the masked block.

Input Arguments

blockName

The handle to the block or the path to the block inside the model.

Examples

  1. Get mask as an object using a masked block’s path.

    p = Simulink.Mask.get('myModel/Subsystem');
  2. Get all the variables defined in the mask workspace for the masked block.

    vars = p.getWorkspaceVariables;