Simulink.MaskParameter.set
Set properties of mask parameters
Description
maskobj.Parameters.set(
sets the
properties of a mask parameter.Name,Value
)
Examples
Set the Values of Mask Parameter
Get mask as an object using a masked block’s path.
maskobj = Simulink.Mask.get('setmaskparameter/Subsystem');
Get mask parameter
parameters = maskobj.Parameters(1);
Edit mask parameter so it is of type popup, cannot be evaluated.
maskobj.Parameters.set('Type','popup','TypeOptions', {'Red' 'Blue' 'Green'},'Evaluate','off')
Input Arguments
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'Type','edit'
Type
— Type of parameter
'edit'
(default) | 'checkbox'
| 'popup'
| 'combobox'
| 'listbox'
| 'promote'
Type of parameter, specified as character vector.
Data Types: char
| string
TypeOptions
— Type options of parameter
'edit'
(default) | 'checkbox'
| 'slider'
| 'dial'
| 'unit'
| 'min'
| 'max'
| 'promote'
| ...
The options that are displayed within a popup
or
combobox
or listbox
parameter, specified as a
cell array.
Data Types: cell
Name
— Name of mask parameter
character vector (default)
The name of the mask parameter, specified as a character vector. This name is assigned to the mask workspace variable created for this parameter.
Data Types: char
| string
Prompt
— Display name for mask parameter
character vector (default)
Display name for the mask parameter, specified as a character vector. This name appears as the label associated with the parameter on the mask dialog.
Data Types: char
| string
Value
— Mask parameter value
character vector (default)
The default value of the mask parameter in the Mask Parameters dialog. Type
specific, depends on the Type
of the parameter, specified as a
character vector.
Data Types: char
| string
Evaluate
— Option to evaluate mask parameter
on
(default) | off
Option to evaluate mask parameter, specified as a logical.
Data Types: logical
Tunable
— Option to change mask parameter during simulation
on
(default) | off
Option to change the mask parameter during simulation, specified as logical value.
Data Types: logical
NeverSave
— Option to save mask parameter value in model file
off
(default) | on
Option to save the mask parameter value in the model file, specified as a logical.
Data Types: logical
Hidden
— Option to hide mask parameter
off
(default) | on
Option to hide the mask parameter in the mask dialog, specified as a logical.
Data Types: logical
ReadOnly
— Option to edit mask parameter
off
(default) | on
Option to edit the mask parameter in the mask dialog, specified as a logical.
Data Types: logical
Enabled
— Option to enable mask parameter
on
(default) | off
Option to enable the mask parameter in the mask dialog, specified as a logical.
Data Types: logical
Visible
— Option to show mask parameter in mask dialog
on
(default) | off
Option to show the mask parameter in the mask dialog, specified as a logical.
Data Types: logical
ShowTooltip
— Option to enable tooltips for mask parameter
on
(default) | off
Option to enable tooltips for the mask parameter, specified as a logical value.
Data Types: logical
Callback
— Callback code for the mask parameter
character vector (default)
Callback code for the mask parameter, specified as a character vector. The callback code executes when a user changes the parameter value in the mask dialog box.
Data Types: char
Alias
— Alternative name for mask parameter
empty (default)
Alternative name for the mask parameter is specified as character vector.
Data Types: char
| string
DialogControl
— Layout options
character vector (default)
Layout options for the parameter in the mask dialog, specified as a character vector. The location of the parameter in the mask dialog such as the row location, prompt location is specified. Additionally horizontal stretch or shrink of the mask parameter is also specified.
Data Types: char
| string
Version History
Introduced in R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)