• 0

How to create UML from code?


Question

Hi, I've heard that it is possible to create a UML diagram from your code in Visual Studio and I'd like to know how to do that and what versions of Visual Studio support it. I have access to pretty much all existing versions of VS including 2005 Team edition and 2008 Professional, although I only installed 2008 Pro.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Hi, I've heard that it is possible to create a UML diagram from your code in Visual Studio and I'd like to know how to do that and what versions of Visual Studio support it. I have access to pretty much all existing versions of VS including 2005 Team edition and 2008 Professional, although I only installed 2008 Pro.

In your solution explorer, right click on the file, and select "View Class Diagram"

Link to comment
Share on other sites

  • 0
In your solution explorer, right click on the file, and select "View Class Diagram"
Whether I right-click on the solution or on the project, in the solution explorer, I don't see that option. Then again, here I'm at school on VS2005 Pro. I'll try it again on VS 2008 Pro when I get back home.
Link to comment
Share on other sites

  • 0
Whether I right-click on the solution or on the project, in the solution explorer, I don't see that option. Then again, here I'm at school on VS2005 Pro. I'll try it again on VS 2008 Pro when I get back home.

I no longer have 2005 installed, so I cannot verify, but 2008 definitely has this feature.

Link to comment
Share on other sites

  • 0
Ok it works in 2008, but why does it only show relations of inheritance, and not composition or agregation?

Ummm... I don't know. LOL It doesn't even appear to be 100% UML compliant. I don't ever use this aspect of the IDE.

Link to comment
Share on other sites

  • 0

I remember there is an option to export it to a Visio file and all you had to do was open it in Visio and drag the classes over into the view. It doesnt do the lines for you but it cuts out typing all the stuff for the class.

Im sorry i cant give you the full details because i dont have VS2005 install anymore (or vs2008). Try looking under the "Project" menu in the Class Diagram editor.

Link to comment
Share on other sites

  • 0

Is there any (free) tool that could produce a complete (well I'm looking for inheritance, agregation, composition and cardinality) UML class diagram simply by looking at your code?

Link to comment
Share on other sites

  • 0
Is there any (free) tool that could produce a complete (well I'm looking for inheritance, agregation, composition and cardinality) UML class diagram simply by looking at your code?

I've seen nothing for .NET that is free and able to reverse engineer. Altova makes one that is inexpensive(compared to other UML editors with reverse engineering capability).

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.