Main Content

getCrossParameterConstraint

Class: Simulink.Mask
Package: Simulink

Get cross-parameter constraint

Syntax

CrossConstraint = maskObj.getCrossParameterConstraint(CrossConstraintName)

Description

CrossConstraint = maskObj.getCrossParameterConstraint(CrossConstraintName) gets the properties of a cross parameter constraint on a mask. Apply a cross-parameter constraint to specify rules between mask parameter values.

Input Arguments

expand all

Handle to the block mask, specified as mask object. You can use the Simulink.Mask.get command to get the block mask handle. For more information, see Simulink.Mask.get.

Data Types: char | cell

Name of the cross-parameter constraint for which you get the constraint properties, specified as the mask object.

Output Arguments

expand all

Cross-parameter constraint properties, returned as a cell array.

Examples

% Get block mask handle.
maskObj = Simulink.Mask.get(gcb); 

% Get cross constraint.
CrossConstraint = maskObj.getCrossParameterConstraint('crossparam1')

ans = 

  CrossParameterConstraints with properties:
            Name: 'crossparam1'
            Rule: 'Parameter2 > Parameter3'
    ErrorMessage: ''
Introduced in R2018a