These examples show how to operate on existing enumerations in a data dictionary.
|On this page…|
In the data dictionary, create a copy of the enumerated type, and rename the copy instead.
Find enumeration objects used by your model that are derived from the type with the old name.
Replace these objects with those derived from the renamed type.
Delete the type with the old name.
Use one of the following approaches.
Select the enumeration within the dictionary, and rename one or more enumeration members.
If your model references enumeration members as strings, change these strings to match the renamed member.
Find references in your model to an enumeration member you want to delete.
Replace these references with an alternate member.
Delete the original member from the enumeration.
You can change the values of enumeration members when you represent these values as MATLAB® variables or by using Value field of Simulink.Parameter objects.
Find references in your model to an enumeration member whose value you want to change.
Make a note of these references.
Change the value of the enumeration member.
Manually update references to the enumeration member in your model.