Marking Elements as Deprecated

In model-driven development, it's common to retain legacy elements for backward compatibility, while indicating that they should not be used for new development. The Deprecated checkbox allows you to clearly mark such elements in your model.

The Deprecated checkbox, available in the Properties view, allows you to:

When set, Model RealTime stores this metadata in the model file, that is .emx file, and may reflect the deprecation in generated code.

How to Mark an Element as Deprecated

Follow the steps below to mark an element as deprecated:

  1. Select the Model Element

  2. Open the Properties View

  3. Enable the Deprecated Flag

  4. Save the Model

Result in the Model File (.emx)

When an attribute is marked as deprecated, the following entry is added to the .emx file:

<CppPropertySets:GeneralAttributeProperties deprecated="true"/>

When the "Deprecated" property is unset or unchecked and reverted to default, the above entry is removed. This keeps the model file clean and minimizes unnecessary differences in version control.