Skip to Main Content
Visual Studio Hacks
book

Visual Studio Hacks

by James Avery
March 2005
Intermediate to advanced content levelIntermediate to advanced
304 pages
19h 23m
English
O'Reilly Media, Inc.
Content preview from Visual Studio Hacks
362
|
Chapter 10, Work with Visual Studio Tools
#82 Generate UML Design Documents from Code
HACK
Reverse Engineer Your Code
To get started, you first need to create a Visual Studio Project. This can be
any type of project, and most likely it’s one that you’ve been working on or
have already created. In this hack, I’m going to use the VehicleLibrary exam-
ple found in “Generate Code from UML”
[Hack #81]. To refresh your memory,
the Solution Explorer of that project can be seen in Figure 10-40.
To reverse engineer the code for this project, do the following:
1. Click Project
Visio UML Reverse Engineer.
2. Browse to the location where you want your Visio file to be saved, give
it a name, and click Save.
3. Depending on the size and complexity of your project, the reverse engi-
neering process may take a moment or two.
4. Once your code has been successfully reverse engineered, an instance of
Visio is automatically started. You can see in the Model Explorer that
your classes have been automatically created (see Figure 10-41).
5. You can also see in your Visual Studio instance that the generated Visio
file has been added to your project under the Solution Items folder.
Create Your Class Diagram
Unfortunately, that’s as far as the reverse engineering will take you. You’ll
have to create the class diagram manually. Depending on the size of your
Figure 10-40. VehicleLibrary project in the Solution Explorer ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Visual Studio 2015 Unleashed, Third Edition

Microsoft Visual Studio 2015 Unleashed, Third Edition

Mike Snell, Lars Powers
.Net Framework Essentials

.Net Framework Essentials

Thuan L. Thai, Hoang Lam
C# 5.0 Unleashed

C# 5.0 Unleashed

Bart De Smet
Programming .NET Security

Programming .NET Security

Adam Freeman, Allen Jones

Publisher Resources

ISBN: 0596008473Errata Page