Monday, January 3, 2022

Add or edit UML element attributes [MS]

You can add or edit attributes of UML elements.

Add an attribute

  1. Double-click the shape in a diagram that represents the element.

    The Properties dialog box opens.

  2. Select a blank row and start typing a name, then type or choose the attribute properties you want.

  3. With that row still selected in the attribute table, select Properties.

  4. Edit the properties as needed:




    Type or edit an identifier string as a name for the attribute. Typically, attribute names begin with a small letter, for example, maximum-size or color.


    Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.


    Type any language-specific annotation text here you want to use to further identify an attribute.


    Type any language-specific annotation text here you want to use to further identify an attribute.


    Choose an implementation type for the attribute. After you select a type, the Prefix, Suffix, and Expression fields become available to edit.

    If the data type you want isn't listed, right-click a data types package in the tree view in the Model Explorer, point to New and then choose DataType, or create a new class.


    Displays the result of data you've added under Prefix, Type, and Suffix.


    Choose the visibility (public, private, or protected) that applies to the attribute. Public means the attribute is publicly available to any class. Protected means the attribute is available inside the class and to its subclasses. Private means that the attribute can only be used inside the class.


    Choose the possible number of data values that can be held by an instance. If the multiplicity is 1, then the attribute holds exactly one value.


    Type the value of the attribute upon initialization.


    Indicates whether the attribute value can be modified after the element is created. None means no restrictions on modification. Frozen means the value can't be altered after the element and its values are instantiated. AddOnly is meaningful only when the multiplicity is not fixed to a single value. It means that additional values can be added but, once added, cannot be removed or altered.


    Choose Instance if each object created by the class has its own value of the attribute. Choose Classifier for owner scope if the attribute value is owned by the class itself. A classifier-scope attribute is underlined.


    Choose Instance if the attribute value is an instance of its data type. Choose Classifier for target scope if the attribute value is the type itself.


    Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.

Edit an attribute

  1. Select the attribute you want to edit.

  2. Select the Properties button.

  3. Edit any of the properties in the dialog box.

Note: The UML Model Explorer is not available in Visio 2013 and newer versions. For information on UML diagrams in Visio 2013 and newer versions, see UML diagrams in Visio.

Delete attributes from a UML element

No comments:

Post a Comment

Search This Blog

Change formula recalculation, iteration, or precision in Excel [MS]

Change formula recalculation, iteration, or precision in Excel Excel for Micr...