Main Content

Simulink.clearIntEnumType

Delete enumeration classes defined by Simulink.defineIntEnumType

Description

Simulink.clearIntEnumType(typeName) deletes a specific enumeration class that is defined by Simulink.defineIntEnumType. The function generates a warning if the class name is invalid or if a class cannot be deleted because instances of the class exist.

example

Simulink.clearIntEnumType() deletes all enumeration classes that are defined by Simulink.defineIntEnumType. The function generates a warning if a class cannot be deleted because instances of the class exist.

example

Examples

collapse all

Define an enumeration type and confirm that it has been created.

Simulink.defineIntEnumType('myEnumType', {'e1', 'e2'}, [1 2]);
myResult = Simulink.findIntEnumType('myEnumType')

Delete the enumeration type that you created and confirm that it is no longer there.

Simulink.clearIntEnumType('myEnumType');
myResult = Simulink.findIntEnumType('myEnumType')

Define two enumeration types and confirm that they have been created.

Simulink.defineIntEnumType('myEnumType1', {'e1', 'e2'}, [1 2]);
Simulink.defineIntEnumType('myEnumType2', {'e3', 'e4'}, [3 4]);
myResult = Simulink.findIntEnumType()

Delete all enumeration types and confirm that no enumeration types exist.

Simulink.clearIntEnumType();
myResult = Simulink.findIntEnumType()

Input Arguments

collapse all

Name of a specific enumeration class that is defined by Simulink.defineIntEnumType, specified as a character vector or string.

Example: 'myEnumType'

Data Types: char | string

Version History

Introduced in R2018b