Creating customized diagram elements

After a new diagram type has been defined, you can define new drawing elements that can be included in the Diagram Tools for the new type of diagram. This is done by basing the new element on one of the elements that is available by default in the diagram type that served as the base for the new customized diagram.

Procedure

  1. Select the name of the relevant profile in the browser, and use the menu to create a new stereotype.
  2. Open the Features window for the new stereotype you created.
  3. On the General tab, from the Applicable to list select the type of drawing element that must serve as the base element for the new diagram element type you are creating. Also, select the New Term check box.
  4. On the Properties tab, provide values for the following properties:
    • Model::Stereotype::DrawingToolIcon provides the name of the .ico file that should be used as the icon for the new drawing element when it is included in a Diagram Tools.
    • Model::Stereotype::DrawingToolTip provides the text that must be displayed as a ToolTip for the icon in the Diagram Tools.
    • Model::Stereotype::DrawingShape where if you would like to customize, to a certain degree, the appearance of the new element that you created, you can select one of the options provided for this property, for example, you can create a new element based on Class, but specify that the object have "rounded corners" when displayed on a diagram.
    • Model::Stereotype::AlternativeDrawingTool where in certain cases, a number of different out-of-the-box drawing elements are based on the same metaclass, for example, both Class and Composite Class are based on a metaclass called Class. In these cases, in addition to specifying the base metaclass in the Applicable to box, you must provide the name of the wanted base element in the property. This property does not have to be provided for the "default" element for the metaclass. Using our example in this topic, if you were basing the new element on the Class element, there would be no need to provide a value for this property.

Feedback