Attributes are features of an element that represent the properties or internal data elements of that element. Not all element types support attributes, and others have restrictions - for example, attributes of Interfaces must have Public scope.

Elements with attributes (typically Classes) display their features in diagrams in the manner illustrated below. Attributes display in the first compartment of properties in colored text - the default color is red (for example, Age : int).


For a Customer Class, CustomerName and CustomerAddress can be attributes. Attributes have several important characteristics, such as type, scope (visibility), static, derived and notes.





See also

Create and Modify Element Attributes

In the Project Browser, Classes with attributes have their features collected beneath them, each preceded by a blue box (attbox)

In the Diagram view, either:

  • Right-click on the element to be edited, and from the context menu select the Attributes menu option
  • Click on the element and press ( F9 ), or
  • Drag the attribute from the Project Browser onto the element

The <Element name> Attributes dialog displays

This facility is only available if the element supports attributes



  • If you make changes and do not save them, the Cancel button prompts you to save or cancel the changes, whilst the Close button closes the dialog immediately and does not save the changes
  • If you are creating many attributes, go to the Attribute/Operations page of the Options dialog (Tools | Options | Source Code Engineering | Attribute/Operations) and select the After save, re-select edited item checkbox; now, when you create an attribute and click on the Save button, the dialog fields clear ready for you to enter the details of the next attribute - this helps you when you want to create attributes quickly and might not necessarily want to fully define each one as you create it
  • If the parent element provides source or target roles for a connector, the connector can be attached to a specific attribute (feature)

Learn More: