This tool lets you type strings like "Action1-*Action2-Action3" to create elements quickly. You can capture a model of your design or requirements while you are in a meeting with the team or the customer. The code shows how to build UML models in an application, and how to unit test a UML extension.

Try the sample

You need Visual Studio Ultimate.

Download and open the sample solution, and press F5. An experimental Visual Studio starts. In it, open a UML model.

Make sure the UML model has at least one class diagram, activity diagram, and use case diagram.

On any of these diagrams, right click and then click Rapid Entry.

In the Rapid Entry window, type lines like these and see the elements added to the diagram:

Class1 - Class2 - Class3
Create classes and associations
Class1 -* Class4 +-? Class5
Association with multiplicities
Class4 >-* Class6 -*> Class1
Aggregation and arrows
Class1 ^ Class2
Inheritance
r Actor1 - Usecase1 - Actor2
Actors and Use cases - just for this line
r
Actors and use cases on all following lines
a
Activities
i
Interfaces
e
Enumerations
c
Classes

Element names must not contain spaces and must be two or more characters long.

Press TAB to complete a name from the set of existing names.

Unit Testing

Run unit tests by clicking Run All Tests in Solution or Debug All Tests in Solution.

The tests start a new instance of Visual Studio. You can see the model being built. At the end of the tests, the new VS closes, and the test results show all green.

Use the unit tests to verify changes that you make. It's a useful practice to separate code changes that are:

For more information, see How to Run Unit Tests on UML Extensions.

Deployment

You can update the source to your own needs, and distribute the result to your team. Copy the .VSIX file from bin\Debug to each computer, and double-click it.

What this sample demonstrates

The code of the sample shows you:

Scope of the Sample

This sample is offered as a demonstration to give you ideas about how to write your own code to extend Visual Studio. As a sample, it has not been rigorously tested or polished. We do not recommend that you use it in its present form to support important work.

Discussion

Please post suggestions and questions to the Visualization and Modeling SDK Forum.