Simulink.Mask Class
Namespace: Simulink
Control masks programmatically
Description
Use an instance of the Simulink.Mask
class to perform
the following operations:
Create, copy, and delete masks.
Create, edit, and delete mask parameters.
Determine the block that owns the mask.
Obtain workspace variables defined for a mask.
Properties
Type
— Mask type of block
character vector (default) | string
Mask type of the associated block is specified as a character vector or string.
Data Types: char
| string
Description
— Description of block
character vector (default) | string
Description of the block, specified as a character vector or string.
Data Types: char
| string
Help
— Help text for the masked block
character vector (default) | string
Help text for the masked block, specified as a character vector or string.
Data Types: char
| string
Initialization
— Initialization commands
character vector (default) | string
Initialization commands for the masked block, specified as a character vector or string.
Data Types: char
| string
SelfModifiable
— Option to allow block to modify its contents
off
(default) | on
Option to allow the block to modify its contents, specified as a logical.
Data Types: logical
Display
— MATLAB® code for block icon
character vector (default) | string
MATLAB code for the block icon, specified as a character vector or string.
Data Types: char
| string
IconFrame
— Visibility of block frame
off
(default) | on
Visibility of the block frame, specified as a logical value.
Data Types: logical
IconOpaque
— Option to make the icon opaque
opaque
(default) | transparent
Option to make the icon opaque, specified as a logical.
Opaque: Make the icon opaque.
Transparent: Make the icon transparent.
Data Types: logical
RunInitForIconRedraw
— Option to run initialization before executing drawing commands
off
(default) | on
| analyze
Option to run mask initialization commands before executing the mask icon commands, specified as enumerated data type.
Data Types: enum
IconRotate
— Option to rotate icon with block
none (default) | port
Option to rotate icon along with block, specified as enumerated data type.
Data Types: enum
PortRotate
— Port rotation type
default (default) | physical
Port rotation type, specified as enumerated data type. Set this property to
default
to reorder ports after a clockwise rotation to maintain a
left-to-right port numbering order for ports along the top and bottom of the block and a
top-to-bottom port numbering order for ports along the left and right sides of the
block. Set this property to physical
to rotate ports with the block
without reordering them after a clockwise rotation.
Data Types: enum
IconUnits
— Units for drawing commands
autoscale (default) | pixels | normalized
Units for drawing commands, specified as enumerated type.
autoscale
scales the icon to fit the block frame.
normalized
draws the icon within a block frame whose bottom-left
corner is (0,0) and whose top-right corner is (1,1). Only X and Y values from 0 through
1 appear. When the block is resized, the icon is also resized. pixels
draws the icon with X and Y values expressed in pixels. The icon is not automatically
resized when the block is resized.
Data Types: enum
SaveCallbackFileWithModel
— Option to save callback file with the model
off
(default) | on
Use this option to save the callback file along with the model, if you have mask initialization code and callback code in a separate MAT file, specified as a logical value.
Data Types: logical
CallbackFile
— Name of callback file
empty (default) | character vector | string
Name of the callback file containing the mask initialization code and callback code, specified as a character vector or string.
Data Types: char
| string
Parameters
— Mask parameter properties
Simulink.MaskParameter
object (default)
Mask parameter properties, specified as a Simulink.MaskParameter
object.
PortIdentifiers
— Port identifier properties
Simulink.Mask.PortIdentifiers
object (default)
Port identifier properties, specified as a
Simulink.Mask.PortIdentifiers
object.
ParameterConstraints
— Parameter constraints properties
Simulink.Mask.Constraints
object (default)
Option to add or remove parameter constraint rule, specified as a
Simulink.Mask.Constraints
object.
CrossParameterConstraints
— Constraints between parameters
Simulink.Mask.CrossParameterConstraints
(default)
Constraints between parameters, specified as
Simulink.Mask.CrossParameterConstraints
.
PortConstraints
— Port constraints properties
Simulink.Mask.PortConstraint
object (default)
Option to add or remove port constraints, specified as a
Simulink.Mask.PortConstraint
object.
CrossPortConstraints
— Cross port constraints properties
Simulink.Mask.CrossPortConstraint
object (default)
Option to add or remove constraints on ports of the masked block, specified as a
Simulink.Mask.CrossPortConstraint
object.
Methods
Public Methods
addCrossParameterConstraint | Add cross-parameter constraint |
addCrossPortConstraint | Create cross-port constraint among ports of the same masked block |
addDialogControl | Add dialog control elements to mask dialog box |
addParameter | Add a parameter to a mask |
addParameterConstraint | Add parameter constraint to a mask |
addPortConstraint | Create port constraint on a mask object |
addPortConstraintAssociation | Associate port constraints to port identifiers |
addPortIdentifier | Creates a port identifier to identify port in mask |
copy | Copy mask from one block to another |
delete | Unmask a block and delete the mask from memory |
getAssociatedParametersOfConstraint | Get mask parameters associated with a constraint |
getCrossParameterConstraint | Get cross-parameter constraint |
getCrossPortConstraint | Display attributes of cross-port constraint |
getDialogControl | Search for a specific dialog control on the mask |
getDialogControls | Retrieve root level containers from a masked block |
getOwner | Determine the block that owns a mask |
getParameter | Get mask parameter by name |
getParameterConstraint | Get mask parameter constraint properties |
getPortConstraint | Displays attributes of specified port constraint |
getPortConstraintAssociation | Displays port identifiers associated with port constraint |
getPortIdentifier | Displays attributes of specified port identifier |
getWorkspaceVariables | Get variables defined in mask workspace for masked block |
insertParameter | Create and insert mask parameter at a specified index |
isMaskWithDialog | Check if block mask contains dialog controls and parameters |
isSimpleMask | Check if block mask contains only mask dialog controls |
numParameters | Display number of parameters in a mask |
removeAllCrossParameterConstraints | Delete all cross-parameter constraints from a mask |
removeAllCrossPortConstraints | Remove all cross-port constraints from mask object |
removeAllParameterConstraints | Delete all mask parameter constraints |
removeAllParameters | Remove all existing parameters from a mask |
removeAllPortConstraintAssociation | Removes the associations of all port constraints from mask |
removeAllPortConstraints | Remove all port constraints on masked block |
removeAllPortIdentifiers | Removes all port identifiers from mask object |
removeCrossParameterConstraint | Delete a cross-parameter constraint |
removeCrossPortConstraint | Remove cross-port constraint |
removeDialogControl | Remove dialog control from mask dialog box |
removeParameter | Remove parameter from mask dialog box |
removeParameterConstraint | Delete a mask parameter constraint |
removePortConstraint | Remove specified port constraint |
removePortConstraintAssociation | Remove association between port constraint and port identifiers |
removePortIdentifier | Removes specified port identifier from mask object |
set | Set properties of an existing mask |
Simulink.Mask.create | Create a mask on a Simulink block |
get | Returns mask from a specified block |
Version History
Introduced in R2010a
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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)