Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: elr on June 10, 2026, 09:19:17 am

Title: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: elr on June 10, 2026, 09:19:17 am
Hi all,

I set up and added a toolbox page to my MDG referring to some Azure elements (App Service, VM, SQL DB and so on...). That`s great but I cannot make corresponding icons to appear when I place one of these element to my diagram...Now I wonder if it's even possible...

It's weird that it's seems so hard to set this up.

As icons are bitmap, the Phil Chudley's trick (cut/paste  <Image></Image> blocks from Archimate.xml file to _image attribute) seems useless  :(

Thank's for your help.

Eric

Title: Re: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: Eve on June 10, 2026, 09:32:01 am
Here's how to specify an icon for the toolbox:

Assign Icons To Toolbox Items (https://sparxsystems.com/enterprise_architect_user_guide/17.1/modeling_frameworks/icons_for_toolbox_items.html)

To use an image for diagram rendering, add the image to your technology:

Add Images (https://sparxsystems.com/enterprise_architect_user_guide/17.1/modeling_frameworks/addingimagesinmdgtechnolog.html)

Add a shape script (https://sparxsystems.com/enterprise_architect_user_guide/17.1/modeling_frameworks/add_shape_scripts_to_uml_profi.html) to your stereotype.

Draw the image using the image function:

Drawing Methods (https://sparxsystems.com/enterprise_architect_user_guide/17.1/modeling_frameworks/drawing_methods.html)

Example Scripts (https://sparxsystems.com/enterprise_architect_user_guide/17.1/modeling_frameworks/example_scripts.html) (Near the end)

Title: Re: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: elr on June 11, 2026, 12:36:47 am
Thx Eve. These links are useful for  a "classical"  image management.

In my case, I refers to Sparx Azure Images and Icons imported into my MDG model.

I created few class stereotypes and assigned each an Azure image directly from browser (no Image manager in this case) to "profile" diagram. I then could see images in diagram.

Once MDG is regenerated (no change in settings check boxes)  I import it to my sample model.

I then could find Azure elements in my dedicated toolbox but when I drop each of them into a new blank diagram, I do not see corresponding image, just default rectangular shape appears.

Did I missed something when I set up each Azure stereotypes attributes ?
Thx

Eric

Title: Re: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: Geert Bellekens on June 11, 2026, 02:18:39 am
Eric, there are two types of "images".

The icon you assign your stereotype. That will be shown in the toolbox and project browser
And then the image you want to show on the diagram.

That is actually set in the shapescript.
Assinging an image to your stereotype element doesn't have any effect in your MDG.

Geert
Title: Re: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: elr on June 11, 2026, 08:04:29 am
Thx Geerts !

If you refers to 'image' command in ShapeScript, the example from examples scripts array pointed by Eve clearly mentions that image must be loaded into Image Manager, first.

Code: [Select]
shape main{
// DRAW AN IMAGE FROM A FILE, AND AN EDITABLE NAME FIELD
addsubshape ("theimage", 100, 100);
addsubshape ("namecompartment", 100, 100);

shape theimage{
image ("App services", 0, 0, 100, 100);
// "App services" being the name of the image that is loaded into the Image Manager
}

shape namecompartment{
h_align = "center";
editablefield = "name";
println ("#name#");
}
}

That actually does not works on my side  but does it means that Azure Image collection content (or at least the few dozens images I need..) should be loaded in IM one by one after being converted ?
 :o

Eric



Title: Re: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: Geert Bellekens on June 11, 2026, 01:59:16 pm

That actually does not works on my side  but does it means that Azure Image collection content (or at least the few dozens images I need..) should be loaded in IM one by one after being converted ?
 :o

Eric
Yes, I think so. It's been a while since I played with images in shapescripts.
In general I prefer to draw my igages with an actual shapescript and not use those images. They tend to slow down loading a diagram if you have a lot of them.

Geert
Title: Re: Link icons to my Azure cloud toolbox page in my MDG profile
Post by: elr on June 12, 2026, 12:07:37 am
OK... I then suppose that all these images should be added to the MDG at each generation..
and so I don't see the use to load theses collections (Azure, AWS,etc) through the Model manager... ???

As drawing a ShapeScript for each required elements would be a pretty big deal, I'll rather keep Arquesoft Azure lib directly in my models. Our cloud architect will just have to switch between toolboxes.

Thank's again Geert !

Eric