Book a Demo

Author Topic: Why do C #define declartions keep duplicaitng every time I regenerate the code?  (Read 5009 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
I have an interface with several attributes, of a simple type int. I set the following properties to True so that I can get a #define in my header file:

  • Const
  • Static

I also set an initial value for those attributes.

I get the code I need when I forward generate the model. However, when I make some changes to the model and generate the code again, the same declarations are repeated int the code. And this happens each time I generate the code. It keeps appending the #defines again and again. Only by overwriting the file do I get the right result.


Follow-up: I noticed that after clicking on the button in the source code editor called "save source and synchronize with model", the problem seems to go away.
« Last Edit: October 12, 2024, 03:14:26 am by mse »