locked
how to create sequence diagram from c# RRS feed

  • Question

  • Hi all,

      I am in a looot of problem..I want to make sequence diagram from an existing C# code..I have tried almost all the softwares that google showed...like Magic Draw UML, sequence diagram editor...almost everything but none of them is capable of drawing sequence diagram by doing some reverse engineering or anything...

    Actually i need to put a sequence diagram for my thesis and i already coded in c#...

    can anyone pleaseeeeeeeeeeeeeeeeeeeeee help me with this????????????

    any help will be greatly appreciated.

    Thank you very much,

    Regards. 

    Tuesday, December 25, 2007 12:25 PM

Answers

All replies

  • Dear CutiePie,

     

       Im doubtfull if you will be able to create a sequence diagram directly from the C# code...

     

    Regards,

    Sandeep A

    ----------------------------------------------------------------------

    [Mark appropriate post(s) as Answer(s)]

     

     

     

     

     

    Friday, December 28, 2007 6:47 AM
  • Based on my Research regarding your point you cant simply generate a Sequence Diagram from your C# code because this is mainly based on your Use Cases development but you can use Visio Reverse Engineering to build your application components and classes then start building your sequence diagram using it

    Friday, January 4, 2008 12:17 PM
  • hi,

      thanks for your reply..can you tell me how can i do this is Microsoft Visio?? I have Visio installed..is there any option there to do this REVERSE ENGINEERING there???? pleaseeeee help me out in this...I will be very greatful to you...

    THANKS A TON,

    Regards.

    Friday, January 4, 2008 4:34 PM
  •  

    Actually You don't do this from the Microsoft Visio you do it through the Visual Studio

     

    Open your Project in Microsoft Visual Studio

     

    Right click on the toolbars and open the UML Model tool bar

     

    You will find a button that will help you generating you visio file with your classes and project components

     

    for more info don't hassitate to contact me Smile

     

     

    Friday, January 4, 2008 9:14 PM
  • sorry again.....but i just cant find where exactly in the toolbaar because i right clicked on the menu bar then it is showing me choices like CLASS Designer, XML editor and many other options but there is nothing wiht UML  Sad

    I have Visual Studio 2005, Professional Edition version 8.0.50727.42....I hope you understood my problem and would help me out in this Sad...

    Thanks a lot...

    Regards.

    Friday, January 4, 2008 11:50 PM
  • YOu mainly need Visio Enterprise architect Edition to be able to do this what is the version of visio you do have .

     

    You can find Visio Enterprise architect as a part of visual studio 2005 Team Suite DVD

     

    Saturday, January 5, 2008 12:07 PM
  •  

    You need Visio Enterprise Architect to be able to do that you can find it as a Part of Visual Studio 2005 Team Suite DVD
    Saturday, January 5, 2008 12:09 PM
  •  

    Thanks a lot for your guidence...I already installed Visio Enterprise...and i found the choice as you mentioned the Reverse Engineering one....but now the problem is..that when i do reverse engineering...it shows on VISUAL STUDIO that its reversed with 0 errors...but on VISIO when i am trying to open the document then on the left pane there all 12 classes of my program but nothing in the DIAGRAM...i mean its just empty...then i tried to do it with just one class..and did reverse engg with just one class...but stil there is nothing on the DIAGRAM screen..what should i do now?? Sad

    Thanks a lot.

    Saturday, January 5, 2008 5:18 PM
  • That's good , all you need to do now is to select the classes you want to add to your diagram and drag them to the diagram sheet

    Sunday, January 6, 2008 7:48 AM
  • Thanks again...But i tried that before as well Sad...its just showing me class diagrams...I tried to do it like NEW-->SEQUENCE DIAGRAM....and then drag and dropped classes...but its just showing me the class diagrams..separately..its not even connecting them Sad....and i wanted a sequence diagram.... but i guess no luck in this

    Thanks for your help,

    Regards.

     

    Sunday, January 6, 2008 5:24 PM
  • I'm confused, I have to admit.

     

    As far as I'm aware Visio won't let you reverse engineer into sequence diagrams.  You wouldn't necessarily be able to infer a sequence diagram from code, since when it runs, it often has state, external resources and so on.  Also the code should be sufficiently decoupled, and using interfaces such that you may not necessarily know which class implementation of an interface would be used whilst running you code, or at least not without supplying it with some form of state data.  If you could do that then you'd only get a sequence diagram for that particular state data.

     

    You can certainly use Visio, or better still Visual Studio 2005 to do UML diagramming for class diagrams though, but it seems that you don't actaully want to do that?

     

    What are you after a sequence diagram for?  Documentation after the fact?  An approach could be to use the debugger, and make notes on the call stack during operations, so that you can then use Visio EA to diagram what you find?  I'm not sure how useful a sequence diagram would be in terms of documentation, as it is often used to check for gaps in implementation, or to document how some functionality is to be implemented.  I'd imagine once it is implemented and has associated unit tests (you do have unit tests, right?) then that would be sufficient implementation documentation?

     

    I hope that helps you, and I'm sorry that it probably wasn't what you wanted to hear,

     

    Martin Platt.

    Tuesday, January 8, 2008 4:18 AM
  •  

    Use Sparx System EA UML tool. It does it pretty easily.

    www.sparxsystems.com

    Tuesday, January 8, 2008 9:37 PM
  • Borland together does it too

    Sunday, February 3, 2008 6:12 PM
  • Martin, I think your response is on the money but I may be able to add some value.

     

    CuttiePie, a diagram generally emphasizes some aspect of a system from a particular perspective and for a particular purpose - I'm sure I lifted that from one of the Three Amigos' books. A modeling/diagramming tool cannot really determine what to include in a given diagram because it can't really know what aspect you mean to emphasize or what is important for the perspective or purpose you intend.

     

    The tools that I've seen attempt to auto-generate diagrams don't really help unless the desired aspect is quite simple. Generally, they diagram everything - creating that sipping water from a fire hydrant feeling. Sort of defeats the purpose, i.e. providing a readily understandable, simplified view of something too complex to otherwise grasp - in totality and all at once.

     

    Instead Visio (and similar tools) tend to reverse class definitions (relationships and a bit more) providing a nice foundation with which to build diagrams that are appropriate to your purpose. Hope that helps.

     

    CAVEAT: I'm brand new to using Visio 2007 Pro/Visual Studio 2005 as modeling tools.Formerly I've used Rational Rose, Sparx System's Enterprise Architect, and misc. free ware not worthy of note.

    Wednesday, April 9, 2008 9:34 PM
  • Rosario April CTP Team Architect Edition has the ability to generate sequence diagrams from existing code, a trial download can be found here: http://www.microsoft.com/downloads/details.aspx?FamilyID=65D0E3BD-9DF3-421A-804F-8F01BD90F0B4&displaylang=en

    Thursday, April 17, 2008 7:03 AM
  • And how does that work for you? Anyone?

     

    Sunday, April 27, 2008 1:23 AM
  • I did some investigation according to this, see my blog for details. It isn't that mature "yet" and stil has some bugs… But it looks promising.

    Saturday, May 3, 2008 5:43 PM
  • Thanks Clemens, I look forward to reading your blog entries.

     

    Monday, May 12, 2008 7:11 PM
  • You need to use a tool that instruments the code and performs runtime logging. The log output can be used to generate sequence diagrams.
    There are lots available. One that I've used in the past is LRDA to generate sequence diagrams from pre-existing C code.
    Friday, May 30, 2008 9:58 AM
  • Hi,

    I Installed VSTS 2008.

    Can we have any plug-in setup such that i can have Architecture Explorer in View Tap of VSTS 2008 where i can work with Several Diagrams(UML's)?

     

    I looked for VSTS Rosario Edition,but iam unable to download the Trail Version.

     

     

    srinivas. 

     

    Tuesday, October 7, 2008 11:48 AM
  •  

    Actually Reflector.net has a plugin which can generate an event sequence diagram (SequenceViz).   The output is hard to use as it is a SVG image.   But Hey, it works

     

    http://weblogs.asp.net/nleghari/archive/2008/10/13/sequenceviz-0-11-reflector-addin-support.aspx

     

    Cheers,

    Alex

    Tuesday, October 14, 2008 11:53 PM
  • hey i wish to be success from my heart >>>
    about your sequance diagram better and easy for you in use rational rose then any help i will be ready
    >>>>>>

    Wednesday, January 14, 2009 4:14 PM
  • Good News, Guys!!!

    Visual Studio 2010 has a built-in support for sequence diagrams. I have used it in the VSTS edition. Take a look here:
    http://dotnet.org.za/willy/archive/2008/11/18/visual-studio-2010-ctp-2-a-close-encounter-with-sequence-diagram.aspx

    This is an absolute cool feature provided by Microsoft!

    Hope this helps you all!
    Sandeep Aparajit | Home | My Blog | Photography | Mark useful posts as Answer/Helpful.
    Wednesday, May 27, 2009 8:26 AM
  • You can download Beta 1 of Visual Studio Team System 2010 from here:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=85520793-68fc-4361-a8b6-dc2cff49c8d2&displaylang=en


    Esther Fan | User Education | Visual Studio Team Architect
    Tuesday, June 2, 2009 5:53 PM
  • Hi,

    I don't know if there is a software that creates a diagram automatically, but If you have your Use Case Diagrams, you could easily part from there to create the sequence diagrams using rational rose or even StarUML(Open source). If not, the fastest path I can imagine Is creating the use case diagrams from the requirements and then create the sequence diagrams.

    -Alex
    Tuesday, December 1, 2009 8:52 PM
  • Hi,

    Here is one of the options that i use

    1. Use your existing C# code and open the same in VS 2005
    2. Reverse engineer the same an get your class diagarms
    3. Import these class diagarm into Visio and then use visio to create your sequence diagrams

    I am propsing this apporach with the assumption that you have doe in place

    Regards
    Azhar


    Mark as answer if this helps
    Thanks and Regards Azhar Amir
    Wednesday, December 2, 2009 11:16 AM
  • Quote: "You need Visio Enterprise Architect to be able to do that you can find it as a Part of Visual Studio 2005 Team Suite DVD"
    ___________________________________________________

    this is a super cool program - just bought it!
    Wednesday, December 9, 2009 2:11 PM
  • You can try out Beta 2 now also: http://www.microsoft.com/visualstudio/en-us/try/default.mspx#download


    Esther Fan | User Education | If a post answers your question, please click the "Mark As Answer" for that post. Thanks!
    Saturday, December 12, 2009 12:54 AM