Main Content

getCrossPortConstraint

Display attributes of cross-port constraint

Since R2023a

Syntax

amaskobj.getCrossPortConstraint(name)

Description

amaskobj.getCrossPortConstraint(name) displays the attributes of a cross-port constraint.

Input Arguments

expand all

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

Data Types: char | string

Examples

expand all

View the attributes of a cross-port constraints of a mask object.

%Get mask object and view cross port constraints
amaskobj.getCrossPortConstraint('CheckDatatype')
ans = 

  CrossPortConstraint with properties:

                   Name: 'CheckDatatype'
                   Rule: 'SameDataType'
    ParameterConditions: [0×0 Simulink.Mask.ParameterCondition]
           Associations: {3×1 cell}
        DiagnosticLevel: 'error'
      DiagnosticMessage: 'The Input_1 and Output_1 should have same DataType'

Version History

Introduced in R2023a