Main Content

Simulink.dialog.MaskPartReference Class

Namespace: Simulink.dialog
Superclasses: Simulink.dialog.Control, Simulink.dialog.Container

Create and save parameters and dialog controls and reuse them across multiple masked blocks

Since R2024b

Description

Use the mask part reference container to create and save the parameters and dialog controls in an XML file to refer to and reuse them across multiple masked blocks. To create a mask part reference object, create a mask object and using the mask object and addDialogControl method add the mask part reference container. For more information, see Mask Part Reference

The Simulink.dialog.MaskPartReference class is a handle class.

Properties

expand all

Name of the mask part reference container, specified as a string or character vector.

Example: 'ACControls'

Data Types: string | char

Name of the XML file containing mask parameters and dialog controls, specified as a string or a character vector.

Example: 'acControls'

Data Types: string | char

The default value for each parameter inside mask part reference container, specified as cell array. Use the InstanceValues property to specify parameter name-value pairs that override the value of the corresponding parameter in the mask part reference XML file.

For example, if the default value of humidity in the XML file is 5, you can override this default value as 10 in a specific block by using InstanceValues property. The mask dialog displays the value of humidity as 10.

Example: {'humidity'}{'10'}{'temperature'}{'35'}

Data Types: cell

Placement of mask part reference container, specified as 'new' or 'current'.

  • 'new' — Place the mask part reference container in a new row in the mask dialog box.

  • 'current' — Place the mask part reference container in the same row as the previous dialog control in the mask dialog box.

Data Types: char

Option to edit the mask part reference container on the mask dialog box, specified as 'on' or 'off'.

  • 'on' — You can click the mask part reference container on a mask dialog box.

  • 'off' — You cannot click the mask part reference container on a mask dialog box.

Data Types: logical

Option to display the mask part reference container on the mask dialog box, specified as 'on' or 'off'.

Data Types: logical

Option to justify the text boxes of edit and popup parameters within the mask part reference container, specified as 'on' or 'off'.

  • 'on' — Justify text boxes within the mask part reference container based on the longest parameter prompt.

  • 'off' — Do not justify text boxes.

Data Types: logical

Child dialog controls of the mask part reference container, specified as Simulink.dialog.parameter.Control object.

Informative message that appears when you point to an instance of the mask part reference container, specified as a string or character vector.

Data Types: string | char

Methods

expand all

Version History

Introduced in R2024b