Main Content

getCrossPortParameterConstraint

Class: Simulink.Mask
Namespace: Simulink

Display attributes of cross port parameter constraint

Since R2025a

Syntax

maskObj.getCrossPortParameterConstraint(consName)

Description

maskObj.getCrossPortParameterConstraint(consName) displays the attributes of a cross port parameter constraint.

Input Arguments

expand all

Name of the cross port parameter constraint, specified as a character vector or string scalar. If the cross port parameter constraint does not exist, the software returns an error.

Example: maskObj.getCrossPortParameterConstraint("myconstraint")

Data Types: char | string

Examples

View the attributes of a cross port parameter constraint of a mask object.

maskObj.getCrossPortParameterConstraint('myconstraint')
ans = 

  CrossPortParameterConstraint with properties:

                   Name: 'myconstraint'
                   Rule: 'SameDataType'
    ParameterConditions: [0×0 Simulink.Mask.ParameterCondition]
           Associations: [1×1 Simulink.Mask.CrossPortParameterAssociation]
        DiagnosticLevel: 'error'
      DiagnosticMessage: 'The input ports and parameter must be of same datatype'

Alternatives

You can also create cross port parameter constraint from the Mask Editor.

Version History

Introduced in R2025a