[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
The UML API of Visual Studio Ultimate lets you write code to create, read, and update UML models and diagrams.
In addition to the API reference pages, the following topics describe the API.
Topic | Example types and methods described | Features described |
|---|
How to: Navigate Relationships with the UML API | UML elements and their properties and associations. For example, IElement and its descendants, including: IClass, IActivity, IUseCase, IComponent, IInteraction, IModel, IPackage | In Visual Studio Ultimate, UML models conform to the UML specification version 2.1.2, which can be obtained at the UML Resource Page. Each type is an interface that has the same name as the UML type, prefixed with "I". |
How to: Create Elements and Relationships | IPackage.CreateClass() IClass.CreateOperation() | Each element type has methods for creating its children. |
How to: Display a Model on Diagrams | IShape, IDiagram IShape.Move() | Each element in a model can be represented as a shape on a diagram. In some cases, you can create new shapes for each object. You can move, resize, color, and collapse or expand these shapes. |
How to: Navigate the UML Model | IModelStore IDiagramContext | The Model Store stores the model. The Diagram Context gives you access to the current diagram and store. |
How to: Link Model Updates using Transactions | ILinkedUndoContext | You can link a series of changes into one transaction. |
How to: Define a Menu Command on a Modeling Diagram | IMenuCommand IGestureExtension ICommandExtension | You can extend a diagram's functionality by defining commands invoked by double-clicking and by dragging onto the diagram. |
How to: Use Validation Constraints with UML Models | ValidationContext | You can define validation rules that help you make sure that a model conforms to specified constraints. |
How to: Get UML Model Elements from IDataObject | IElement, IShape | When an element is dragged from UML Model Explorer or a UML diagram to another diagram or application, it is serialized as an IDataObject. |
How to: Edit Interactions using the UML API | IInteraction, ILifeline, IMessage | Creating and updating an interaction diagram is slightly different from working with the other diagram types. |
Although it is possible to access the implementation that underlies the API, we recommend that you avoid doing this as much as you can, because the implementation might change periodically.
Concepts
Other Resources