Share via


How can I generate Class diagram and Sequence diagram for existing C# code?

Question

Thursday, August 17, 2006 11:13 AM

Does anyone know how can class diagrams and sequence diagrams  be automatically generated for the classes I have written in C# in my Visual Studio 2005 project?

All replies (4)

Thursday, August 17, 2006 11:19 AM

You can generate a clas diagram for an existing class by right clicking on the class file in Solution Explorer and selecting view class diagram.


Thursday, August 17, 2006 11:51 AM

How about a sequence diagram? Can existing code be used to generate these sequence diagrams?

Thanks for your help.


Friday, September 8, 2006 12:15 PM

Hi using Debug.StackTrace you could get a sequence of method calls, filter out all the BCL related calls and you draw a sequence diagram out of it, and if you further tweak that you could draw a communication diagram too.

--Rama--


Friday, January 11, 2008 9:17 AM

There is a tool called LumiCode that does very nice diagrams.  The free version does class diagrams but you will need the Professional version ($235) for sequence diagrams.  See the description at http://www.lumikon.com