Main Content

removePortConstraint

Class: Simulink.Mask
Namespace: Simulink

Remove specified port constraint

Since R2022a

Syntax

aMaskObj.removePortConstraint(name)

Description

aMaskObj.removePortConstraint(name) removes the specified port constraint from the mask object.

Input Arguments

expand all

Name of the port constraints to be removed from the mask object, specified as a character vector. An error is displayed if the port constraint does not exist.

Example: aMaskObj.removePortConstraint('pc3');

Example

amaskObj=Simulink.Mask.get(model1/subsystem)
amaskObj.removePortConstraints('pc1')
amaskObj.getPortConstraint('pc1')
Constraints 'pc1' is not available in the block 'model1/Subsystem'.

Version History

Introduced in R2022a