# How to set up icons for stereotypes

**URL:** <https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881>\
**Category:** Plug-in & Open API\
**Created:** [June 21, 2021, 4:18pm UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881 "2021-06-21T16:18:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![starpes](https://avatars.discourse-cdn.com/v2/letter/s/7ab992/32.png) [@starpes](https://forums.visual-paradigm.com/u/starpes)\
**Post date:** [June 21, 2021, 4:18pm UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881/1 "2021-06-21T16:18:10Z")

</div>

Hi all!

I’m creating stereotypes using my plugin. Everything works fine except setting the icon path. I use the _setIconPath_ method, specifying an absolute path to the file (like “_C:\users\user\appdata…_”). In this case, in the stereotype configuration window - the icon is displayed, but in the elements to which this stereotype is assigned - no.

When I try to see the path to the icon in an other good working stereotype (using _getIconPath_), I get something like this: _stereotypeIcons/hMRq9F6FYFVAAQWb_

It looks like the icon needs to be loaded into the project somehow first, and then use the internal path?  
Sorry if my question is naive (I’m just learning Java and creating plugins), but - how, after all, to correctly set the icon for stereotype?

Thanks in advance for the help!

---

<div class="post-metadata">

**Author:** ![Jick](https://avatars.discourse-cdn.com/v2/letter/j/ea666f/32.png) [@Jick](https://forums.visual-paradigm.com/u/Jick)\
**Post date:** [June 22, 2021, 2:08am UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881/2 "2021-06-22T02:08:53Z")

</div>

Hi Starpes,

Thank you for your post. I have forwarded your question to our team. When there is any feedback, I will let you know.

Best regards,  
Jick Yeung

---

<div class="post-metadata">

**Author:** ![Jick](https://avatars.discourse-cdn.com/v2/letter/j/ea666f/32.png) [@Jick](https://forums.visual-paradigm.com/u/Jick)\
**Post date:** [June 22, 2021, 3:15am UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881/3 "2021-06-22T03:15:17Z")

</div>

Hi Starpes,

Currently, our Open API does not support setting up icons for stereotypes. We will consider supporting it in the future. When it is available, I will post here.

Best regards,  
Jick Yeung

---

<div class="post-metadata">

**Author:** ![jackyjoy123](https://avatars.discourse-cdn.com/v2/letter/j/d6d6ee/32.png) [@jackyjoy123](https://forums.visual-paradigm.com/u/jackyjoy123)\
**Post date:** [September 16, 2021, 8:13am UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881/4 "2021-09-16T08:13:24Z")

</div>

thanks for the awesome information.

---

<div class="post-metadata">

**Author:** ![Jick](https://avatars.discourse-cdn.com/v2/letter/j/ea666f/32.png) [@Jick](https://forums.visual-paradigm.com/u/Jick)\
**Post date:** [September 17, 2021, 2:02am UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881/5 "2021-09-17T02:02:22Z")

</div>

My pleasure. 🙂

---

<div class="post-metadata">

**Author:** ![Jick](https://avatars.discourse-cdn.com/v2/letter/j/ea666f/32.png) [@Jick](https://forums.visual-paradigm.com/u/Jick)\
**Post date:** [April 29, 2022, 2:44am UTC](https://forums.visual-paradigm.com/t/how-to-set-up-icons-for-stereotypes/16881/6 "2022-04-29T02:44:55Z")

</div>

Hi Starpes,

3 functions are supported in com.vp.plugin.ProjectManager:

```auto
public String getStereotypeIconPath(IStereotype stereotype);
public void importStereotypeIcon(String aIconPath, File aImageFile, IProject aProject) throws Exception;
public InputStream readStereotypeIcon(String aDisplayImagePath, IProject aProject) throws Exception;

```

You can update to the latest patch build (16\_3\_20220441aj or newer) to obtain the enhancements. The article below shows you the steps:

> **[Update Visual Paradigm to Latest Patch - Visual Paradigm Know-how](https://knowhow.visual-paradigm.com/technical-support/update-to-patch/)**
>
> Upon receiving a problem report or request of enhancement, we do our best to make the necessary changes. You will then be suggested to update your Visual Paradigm installation to the patch release, in which the fix or enhancement has been made. In...

Best regards,  
Jick Yeung
