I'm trying to design a UML diagram ( UML Static Structure ) in Visio and I need to specify my own custom type for an attribute. How do I this ? When I go the Type combo box I see a list of predefined types and it forces me to select one of those, I can't type whatever I want.

enter image description here


I actually have had a similar problem, and unfortunately you CANNOT specify your own attribute type. I'm unsure what David was talking about, That's just a tutorial on creating a diagram. Unfortunately Microsoft didn't leave data-type as a modifiable parameter, and thus, you have to insert a basic parameter and document that it is a custom type.

I am very surprised at the lack of support from Microsoft on it's UML schema in the Visio platform. It could be much better, but I don't think they are working on it actively.

I would recommend specifying an out-of-language type (if you are using C#, choose something else), that way there is a visual queue in the documentation that shows the type difference. If you are only in need of a few types, you can also (in documentation) just use a specific type from another language and specify in documentation the actual type definitions for these.


In Visio 2007 you can add custom datatypes by:

  • In the Model Explorer, right-click "UML System"
  • Select "Packages"
  • Click the "New" button
  • Enter a name for your new Package (I recommend you name it the same as your assembly or namespace)
  • Click "OK"
  • In the Model Explorer, right-click the Package that you just created
  • Select "New > Datatype"
  • Enter the name of your datatype
  • Click "OK"
  • Now your new datatype will be listed along with the other default datatypes

You can add your own custom attributes for UML static structure using Visio in the following way.

  1. On the File menu, point to new, point to Software, and then click UML Model Diagram.

  2. In the tree view, right-click the package in which you want to include the static structure diagram, point to New, and click Static Structure Diagram.

  3. Drag class or object shapes onto the drawing page to represent the classes or objects you want to include in your class static structure diagram or conceptual model.

  4. Double-click each shape to open its UML Properties dialog box, where you can add attributes, operations, and other properties.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.