Main Content

Simulink.Mask.getWorkspaceVariables

Get variables defined in mask workspace for masked block

    Description

    example

    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")

    Examples

    collapse 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