Reputation: 13068
How to represent a .net class library and its classes in the Visio? To me, the Package and the Class seems to represent the library and classes respectively. Any suggestions?
Upvotes: 0
Views: 3036
Reputation: 4787
Having been a while since I've used Visio, but if I recall correctly packages in Visio are the same as namespaces in .NET. Classes in Visio are the same as classes in .NET.
I'm not sure if this is what you were asking?
However, speaking of Visio and .NET. Certain versions of Visio/Visual Studio allow you to reverse engineer your Visual Studio project and automatically generate a class diagram in Visio. To do this:
UPDATE to answer comment:
Normally you'd show a package - class relation ship like this in UML:
This is just an example, but it shows a package (or namespace) containing two classes.
This however does not seem to be possible in Visio. What you can do is add a package to your diagram in Visio. Right click on this package in the tree-view, and select New > Class. Then you can drag this class to your diagram which will now look something like this:
Also, take a look at this link which has some helpful answers for modeling UML diagrams in Visio (you'll want to look under static structure diagrams).
Hope this answers your question.
Upvotes: 4
Reputation: 8208
Modeling a library of classes in UML can be indeed done by modeling the library as a package and the classes in the library as UML classes belonging to the package. Then, classes will be identified by the combination PackageName::ClassName
To model this in Visio, once you have created the package, you can open model explorer, select the package and with the right button select new->class diagram.
Then a new class diagram will open. All classes created in that class diagram are automatically included as part of the package
Upvotes: 2