How To Create Uml Diagrams In Visual Studio 2010
- Remove From My Forums
-
Question
-
Hallo,
In VS2010 I have a project with my classes, intefaces and so. I would like to easily generate a complete Class Diagram in order to have an overview. If I right click the project in solution explorer I can select "View Class Diagram" and this generates a class diagramm that doesn't contain connectors (I don't see aggregations, inheritance and so).
There is another feaure in VS2010. I can add a new project and then select the template "Modeling Project". Here I can then add a lot of UML diagrams (Use Case, Sequence, etc). I can also add the Class Diagram, but I could not find a way to bind this diagram to my existing project. So this would mean that I have to manually add all classes, interfaces, methods, properties to this diagram. And this is unbearable.
Does someone have suggestions ? Thanks
Answers
-
Hi Davico77,
The Class Designer feature (the one you get when "View Class Diagram") helps you to visualize your classes and their relationships. When "View Class Diagram", the tool will generate class shapes with all members as well as inheritance relationships if there are any. I'm not sure why you're not seeing the relationship lines (I assume your classes do have inheritance relationship). But can you try right click on a class shape and select "Show Base Class" or "Show Derived Class" menu item and see if it shows you what you're looking for? In addition, Association relationships are not shown by default when the diagram is generated, they are shown as members within class shape. If you want to visualize the lines, click on the property/field you're interested in and then select "Show as Association" menu.
The Modeling Project and the UML diagrams are new features in VS2010. The UML Sequence Diagram can be generated automatically from your code to help you visualize the methods call sequence. To do so: right click on the method you're interested in, and select "Generate Sequence Diagram". The UML Class Diagram don't yet have the automatic diagram generation built in, this is something we're looking into. Sorry for any inconveniece.
Hope this helps.
Best Regards,
Rong Lu
Program Manager, Visual Studio team, Microsoft- Marked as answer by Wednesday, October 6, 2010 7:05 PM
-
Yes, as the tools that are supported are available mostly for Ultimate with a few exceptions.
Esther Fan | Visual Studio, Content Lead | If a post answers your question, please click "Mark As Answer" on that post and mark as Helpful. Thanks!
- Marked as answer by Esther Fan Microsoft employee, Moderator Tuesday, December 7, 2010 10:21 PM
-
Hi uriah,
Currently exporting UML Diagrams as Visio files is not supported, but you can export a diagram as an XPS file or directly copy it into Office applications (Word, PowerPoint...) for documentation or share with others. On the other hand, we just released VS 2010 Visualization and Modeling Feature Pack which allows you to import Visio files into VS as UML diagrams. In addition, this feature pack also provides a bunch of other new features including create UML Class Diagram from code and generate code from the diagram. List of features:
· Generate code from UML class diagrams.
· Create UML class diagrams from code.
· Import UML class, sequence, and use case elements from XMI 2.1 files.
· Create and view links from work items to model elements.
· Generate dependency graphs for ASP.NET Web, C, and C++ projects.
· Create and validate layer diagrams for C and C++ code.
· Write custom code to create, modify, and validate layer diagrams.
Hope this helps. If you have additional questions/comments on UML Diagrams or the Feature Pack, you can post to Visual Studio 2010 Visualization & Modeling Tools forum and you'll be able to get more info there.
Best Regards,
Rong Lu
Program Manager, Visual Studio team, Microsoft- Marked as answer by Esther Fan Microsoft employee, Moderator Wednesday, October 6, 2010 7:05 PM
How To Create Uml Diagrams In Visual Studio 2010
Source: https://social.msdn.microsoft.com/Forums/en-US/18284fa2-8938-4490-b8b0-f746606959d1/visual-studio-2010-automating-the-generation-of-class-diagrams?forum=vsclassdesigner
Posted by: kennedyuted1981.blogspot.com

0 Response to "How To Create Uml Diagrams In Visual Studio 2010"
Post a Comment