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.
Follow the steps below to mark an element as deprecated:
Select the Model Element
Open the Properties View
Enable the Deprecated Flag
Save the Model
.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.