Enumerations in Data Dictionary

These examples show how to operate on existing enumerations in a data dictionary.

Rename Enumerated Type Definition

  1. In the data dictionary, create a copy of the enumerated type, and rename the copy instead.

  2. Find enumeration objects used by your model that are derived from the type with the old name.

  3. Replace these objects with those derived from the renamed type.

  4. Delete the type with the old name.

Rename Enumeration Members

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.

Delete Enumeration Members

  1. Find references in your model to an enumeration member you want to delete.

  2. Replace these references with an alternate member.

  3. Delete the original member from the enumeration.

Change Underlying Value of Enumeration Member

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.

  1. Find references in your model to an enumeration member whose value you want to change.

  2. Make a note of these references.

  3. Change the value of the enumeration member.

  4. Manually update references to the enumeration member in your model.

Related Examples

More About

Was this topic helpful?