Author Topic: Stereotype and Icons  (Read 1948 times)

Philipp91

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Stereotype and Icons
« on: October 16, 2020, 04:29:00 am »
Hello again,

I would like to add some icons to my stereotypes.
I wanted to ask if I am able to do that just by creating profile diagrams or it can be done only by creating MDG stereotypes?

Kind Regards
Philipp

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10524
  • Karma: +358/-31
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype and Icons
« Reply #1 on: October 16, 2020, 04:55:02 am »
Philipp,

You can't do anything with profile diagram, except exporting them to a profile xml.
From that point on you can either import the profile xml directly, or package it in an MDG file.
I think icons can be used in both situations

You shouldn't be afraid of MDG's, it's really a simple process to create an MDG file.

Geert

Philipp91

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Stereotype and Icons
« Reply #2 on: October 16, 2020, 05:53:08 am »
I am not sure if I explained myself correctly. So I want to add a new icon on my stereotypes and not to use the icons
provided by EA. So for example if I create a stereotype on a class called "Computer" I would like to add a computer icon with it. Until now I found
that documentation :https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/usingtheshapescript.html

About the MDG's, actually I am quite satisfied with being able to create my profiles and profile defined classes and being able to export them for further use. If I will be able to add also icons in this way it could be that this will be all I needed. So as long we discuss about it what is the benefits of making a MDG file?

Kind Regards,
Philipp
« Last Edit: October 16, 2020, 05:55:50 am by Philipp91 »

qwerty

  • EA Guru
  • *****
  • Posts: 11471
  • Karma: +304/-263
  • I'm no guru at all
    • View Profile
Re: Stereotype and Icons
« Reply #3 on: October 16, 2020, 07:41:36 am »
Hard to tell in a few sentences (except that you need MDGs for the real stuff). You might read a bit here: http://samples.leanpub.com/EA-MDG-Profiles-sample.pdf

q.

Philipp91

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Stereotype and Icons
« Reply #4 on: October 16, 2020, 11:51:00 pm »
Just a bit I looked by scrolling the chapter that talks about Icons is unfortunately omitted but I will have a more detailed look to
get the points of MDGs.
However, my basic question is if I can add my own icons on stereotypes without MDG technology, is that possible?

Kind Regards,
Philipp

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10524
  • Karma: +358/-31
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype and Icons
« Reply #5 on: October 17, 2020, 12:16:58 am »
However, my basic question is if I can add my own icons on stereotypes without MDG technology, is that possible?
Yes, I believe you can.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 11471
  • Karma: +304/-263
  • I'm no guru at all
    • View Profile
Re: Stereotype and Icons
« Reply #6 on: October 17, 2020, 12:48:20 am »
For sure. The icons are part of the profiles. You need to add the icon property in the stereotype pointing to the 16 square pix bit image.

q.

Philipp91

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Stereotype and Icons
« Reply #7 on: October 17, 2020, 05:05:57 am »
Thanks for the answers, I will give it a try! :)
Is there any link guiding you for this?

Kind Regards,
Philipp

qwerty

  • EA Guru
  • *****
  • Posts: 11471
  • Karma: +304/-263
  • I'm no guru at all
    • View Profile
Re: Stereotype and Icons
« Reply #8 on: October 17, 2020, 06:31:02 am »
Well, no. Ask a consultant to do it for you (Geert is recommended) would be the easiest. If you're on the trial and error track: good luck.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10524
  • Karma: +358/-31
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype and Icons
« Reply #9 on: October 17, 2020, 08:24:18 am »

Philipp91

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Stereotype and Icons
« Reply #10 on: October 21, 2020, 07:01:25 am »
Hello again,

so in the end I followed the path of creating a MDG file. I followed the tutorials, I was able to create my stereotypes/profiles, customized
toolbox profile and a custom diagram profile. So I deployed the MDG file and tested it on another project and it worked as expected ( I could create the custom diagram, my toolbox existed and so on).

So we go back to the icon issue. What I want to achieve is the same as in this post : https://stackoverflow.com/questions/37611486/how-to-use-a-custom-icon-for-a-stereotype-in-enterprise-architect. The only different thing is that I want to add icons to other element( i.e Action from activity diagram). So after trying for a long time to add an icon on an action it was not working. However, then I had the idea to test the same shape script and image on another stereotype that extend the metaclass "class". Unfortunately it worked...

So is it not possible to add an icon on some particular UML elements?? And if so is there any type of "hack" to be able to do something like that?

Kind Regards,
Philipp

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 10524
  • Karma: +358/-31
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Stereotype and Icons
« Reply #11 on: October 21, 2020, 03:01:09 pm »
Do yo mean you created your own stereotype that extends action, and that doesn't want to take the icon and shapescript?

That should work; I don't thinks there are any restrictions in term of which metaclasses you can extend.

I'm not sure if I ever extended Action though, so I can't say for sure that it's possible.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 11471
  • Karma: +304/-263
  • I'm no guru at all
    • View Profile
Re: Stereotype and Icons
« Reply #12 on: October 21, 2020, 07:28:51 pm »
No problem with Action. Probably the issue itself is not explained correctly?

q.

Philipp91

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Stereotype and Icons
« Reply #13 on: October 22, 2020, 03:31:05 am »
Thanks for the answers. In the end you were both right.
For some wired reason to show the icon on an activity I had to manually import the profile from the MDG file, while to display the icon on a class
element there was no need to do that.

I am trying now to add more than one icon on a stereotype and was not able to achieve it. Is something like that possible?

Kind Regards,
Philipp

qwerty

  • EA Guru
  • *****
  • Posts: 11471
  • Karma: +304/-263
  • I'm no guru at all
    • View Profile
Re: Stereotype and Icons
« Reply #14 on: October 22, 2020, 04:04:35 am »
No. How should EA determine which to show? The open folder is something made in EA's guts.

q.