Creating an enum-object

How to create →enums in an enum-object

  1. Select a folder in the project in which you want to create the enums.

  2. In menu File or from the context menu of the folder, select New and the command Data Type.

  3. In the dialog:

    1. Enter a name under File Name.
      images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg If possible, do not enter invalid characters (e.g. umlauts, blanks, the character –, numbers at the start) because the file name is automatically used as name of the data type and this name must be a valid →IEC-identifier. But if you need such invalid characters in the file name, delete or replace the invalid characters in Data type name before you click Finish.
      It is possible to change the data type name at any time later.

    2. Enter a →namespace under Namespace name . T he text must be an →IEC-identifier or a fully qualified name.
      A fully qualified name consists of a sequence of namespace identifiers separated by . (dots).
      It is also possible to enter/change a namespace later on within the editor. If the field already contains a namespace and you are not able to change the namespace, it is likely that you are creating the object within a namespace folder (in this case the namespace is determined by the namespace folder).

    3. Select Data type with Named Values (Enums).

  4. Afterwards click Finish.
    Result:

    1. The enum-object (with icon images/download/thumbnails/414778154/VarUserDT-version-1-modificationdate-1534238223509-api-v22.png ) is displayed in the views with projects and resources. In the project explorer, the enum-object is displayed as a sublevel of the automatically created ST-object.

    2. The enum-object is opened in the →graphical editor.

  5. Create or edit the content. Details: See "Editing the enums in the enum-editor".