Main Content

getWorkspaceVariables

Class: Simulink.Mask
Namespace: Simulink

Get variables defined in mask workspace for masked block

Description

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

To get the mask object for the mask on a block named BlockName, use this command.

maskobj = Simulink.Mask.get("BlockName")

example

Examples

expand all

  1. Get mask object using a block path.

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

    variables = maskobj.getWorkspaceVariables
    
    variables = 
    
      struct with fields:
    
         Name: 'Parameter1'
        Value: 0
    

Version History

Introduced in R2006a