Author Topic: Why use MDG Link?  (Read 4962 times)

Daniel Bank

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I'd rather be diving
    • View Profile
Why use MDG Link?
« on: January 22, 2010, 11:54:53 am »
Hello all,

I am trying to find some justification for why I would want / need to use MDG Integration for Visual Studio (the IDE I use).

I use the corporate edition of EA and with this version I can already do code / model generation and sychronization.  From what I can tell, this is the main purpose of using MDG integration with VS...

Please can anyone provide me with further justifications?

Thank you,
- Daniel

- Daniel Bank
Software Engineer
Biodesign Institute
Arizona State University

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Why use MDG Link?
« Reply #1 on: January 22, 2010, 12:05:40 pm »
Hi Daniel,

Welcome to the EA forum. :)

As a simple example - One of MDG Link / Integration's primary functions is to keep EA and Visual Studio in synch.  EA will not automatically detect new classes that have been added to your Visual Studio project for example, and generating a new class from your EA model will not automatically add the file to your Visual Studio project.

Daniel Bank

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I'd rather be diving
    • View Profile
Re: Why use MDG Link?
« Reply #2 on: January 22, 2010, 12:29:39 pm »
Hi Aaron,

I watched the demonstration video on MDG integration with VS and saw how the model was automatically updated when a change was made to the code.  I was able to get this to work.

However, the video doesn't show an example of going the other way (changing the model and the change is automatically reflected in the code).  I haven't figured out how to do this yet but am still trying.  Is it possible?

Thank you again,
- Daniel
- Daniel Bank
Software Engineer
Biodesign Institute
Arizona State University

Daniel Bank

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I'd rather be diving
    • View Profile
Re: Why use MDG Link?
« Reply #3 on: January 23, 2010, 03:03:29 am »
I figured out somewhat how to synchronize the code with the model when making changes to the model.  According to the User's Guide in section 2.4 MDG Integrate Options, it says,

"To automatically synchronize changes made in your model to your code, open Enterprise Architect using the
Open in Enterprise Architect command, right-click on the MDG linked package, select the Build and Run |
Package Build Scripts menu option and select the Use Live Code Generation checkbox. With this enabled,
any changes you make in your model should be immediately synchronized in your source code."

I did this and changes to the model are reflected in the code.  RTFM FTW.

However, I still have one problem.  When I try to delete an attribute or rename it, the old attribute is still reflected in code.  I end up getting two attributes, one with the new name and one with the old.  Also, the same thing is true for when I try to delete operations.

Any advice?
- Daniel Bank
Software Engineer
Biodesign Institute
Arizona State University

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Why use MDG Link?
« Reply #4 on: January 25, 2010, 03:45:14 pm »
In the main Enterprise Architect window, open "Tools | Options | Source Code Engineering | Attributes/Operations".  Try enabling "On forward synch, prompt to delete code features not in model".