How to Present Model Elements with Custom Graphics in Trees

You can present the model elements in your diagrams with custom graphics using stereotype icons. These custom graphics not just apply to diagrams but can also display on various trees in the application.

Present model element with stereotype icon

To present model elements with custom graphic via stereotype icon:

  1. Go to Window > Configuration > Manage Stereotypes.

    Manage Stereotypes

    Manage Stereotypes

  2. Select the model type, and press the Add button to create new stereotype.

    Create stereotype

    Create stereotype

  3. Specify the name of the stereotype, then press the button in Icon path to upload its icon.

    Specify name and icon of the stereotype

    Specify name and icon of the stereotype

  4. Press OK to confirm the change.
  5. Right click on the classes you would like to apply that stereotype and select Stereotypes > Edit Stereotype.

    Edit stereotype on model element

    Edit stereotype on model element

  6. Select the stereotype you defined and press OK to confirm the change.

    Add stereotype to model

    Add stereotype to model

  7. Now the model will have stereotype icon showing at the top right. You can switch to present the model only using stereotype icon by right click on the element and select Presentation Options > Stereotype Icon.

    Display model with stereotype icon

    Display model with stereotype icon

Show stereotype icons in trees

To present model elements with stereotype icon in various trees in application:

  1. Go to Window > Application Options.

    Open Application Options

    Open Application Options

  2. Select View, enable Show stereotype icon for model elements in tree.

    Enable Show stereotype icon for model elements in tree option

    Enable Show stereotype icon for model elements in tree option

After that elements will show with its stereotype icons in various trees, such as Diagram Navigator, Model Explorer, etc…

Model shows custom icon in trees

Model shows custom icon in trees

Related Know-how

Related Link

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply