Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: DavidM on July 15, 2016, 02:53:59 pm

Title: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 02:53:59 pm
Hi Everyone,
I am assuming that I am incredibly stupid as this can't be as incredibly difficult as I make out.

I have used MDG to create some custom shapes and connectors.
I have tried to create a custom icon in the custom toolbox.

I have spent two days on this now, following exactly to the letter the (what seems to be the only) instructions at
http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/icons_for_toolbox_items.html

I have created my stereo type for the Icon, referenenced the bmp image with 12 x 12 pixels in grey scale, rebuild the toolbox and profile files, generated he MDG over and over again, and each time I get an image of a folder in there rather than the image I created.

ANy ideas?

Can anyone please tell me what I am doing wrong?

Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 03:02:29 pm
p.s. this is my toolbox file produced

<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
   <Documentation id="06BDE8B1-D" name="wuToolBox" version="1.0" notes="wuToolBox"/>
   <Content>
      <Stereotypes>
         <Stereotype name="ConceptualApplications" alias="ConceptualApplications" notes="Toolbox for Enterprise Conceptual Model" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::Application" type="int" description="" unit="" values="" default="Application"/>
               <Tag name="wuProfile::DataStore" type="int" description="" unit="" values="" default="DataStore"/>
               <Tag name="wuProfile::Orchestration" type="int" description="" unit="" values="" default="Orchestration"/>
               <Tag name="wuProfile::DataFlow" type="int" description="" unit="" values="" default="DataFlow"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="ConceptualBusiness" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::CoreCapability" type="int" description="" unit="" values="" default="CoreCapability"/>
               <Tag name="wuProfile::SupportCapability" type="int" description="" unit="" values="" default="SupportCapability"/>
               <Tag name="wuProfile::ExternalOrg" type="int" description="" unit="" values="" default="ExternalOrg"/>
               <Tag name="wuProfile::InformationFlow" type="int" description="" unit="" values="" default="InformationFlow"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="ConceptualData" alias="ConceptualData" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::DataEntity" type="int" description="" unit="" values="" default="DataEntity"/>
               <Tag name="wuProfile::References" type="int" description="" unit="" values="" default="References"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="ConceptualDataToApp" alias="ConceptualXLinks" notes="" cx="90" cy="70" bgcolor="12632256" fontcolor="-1" bordercolor="-1" borderwidth="1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::IsCreatedBy" type="int" description="" unit="" values="" default="IsCreatedBy"/>
               <Tag name="wuProfile::IsUpdatedBy" type="int" description="" unit="" values="" default="IsUpdatedBy"/>
               <Tag name="wuProfile::IsStoredIn" type="int" description="" unit="" values="" default="IsStoredIn"/>
               <Tag name="wuProfile::IsDeletedBy" type="int" description="" unit="" values="" default="IsDeletedBy"/>
               <Tag name="wuProfile::IsCRUDBy" type="int" description="" unit="" values="" default="IsCRUDBy"/>
               <Tag name="wuProfile::IsArchivedFrom" type="int" description="" unit="" values="" default="IsArchivedFrom"/>
               <Tag name="wuProfile::IsSupportedBy" type="int" description="" unit="" values="" default="IsSupportedBy"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="wuProfile::IsSupportedBy(UML::Dependency)" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolBoxItemImage">
                  <Property name="isActive" value=""/>
               </Apply>
            </AppliesTo>
            <TaggedValues>
               <Tag name="_Icon" type="" description="" unit="" values="" default="C:\Users\gary\Pictures\arrow.bmp"/>
            </TaggedValues>
         </Stereotype>
      </Stereotypes>
      <TaggedValueTypes/>
   </Content>
</UMLProfile>
Title: Re: Sparx Toolbox Icon
Post by: VKN on July 15, 2016, 03:03:27 pm
Isn't the image supposed to be 16 x 16 pixels?
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 03:06:19 pm
Sorry yes it is 16 x 16.. a bit too zealous with my typing.
This is the custom element it is based upon.

<Stereotype name="IsUsedBy" alias="IsUsedBy" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="3" hideicon="0">
            <AppliesTo>
               <Apply type="Generalization">
                  <Property name="direction" value="Source -&gt; Destination"/>
                  <Property name="isSubstitutable" value=""/>
               </Apply>
            </AppliesTo>

THanks

         </Stereotype>
Title: Re: Sparx Toolbox Icon
Post by: KP on July 15, 2016, 03:10:25 pm
You have...

         <Stereotype name="wuProfile::IsSupportedBy(UML::Dependency)" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolBoxItemImage">
                  <Property name="isActive" value=""/>
               </Apply>
            </AppliesTo>
            <TaggedValues>
               <Tag name="_Icon" type="" description="" unit="" values="" default="C:\Users\gary\Pictures\arrow.bmp"/>
            </TaggedValues>
         </Stereotype>

but the stereotype name "wuProfile::IsSupportedBy(UML::Dependency)" doesn't match the tag name "wuProfile::IsSupportedBy". They have to be identical.
Title: Re: Sparx Toolbox Icon
Post by: KP on July 15, 2016, 03:23:44 pm
...plus, it needs to be "Icon" not "_Icon".
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 03:47:53 pm
Yes thanks for that. Those two changes you mentioned were a result of me "fiddling " after I couldn't get it to work out of desperation.

I'll set them back though in case. 
Title: Re: Sparx Toolbox Icon
Post by: Geert Bellekens on July 15, 2016, 03:54:38 pm
1: use the profile helper to avoid mistakes in the attribute names
2: You have to set the Metatype on the stereotype or the icon will not appear in the toolbox.
3: create the toolbox profile after all modifications to the stereotypes are done. If you have changed something to a stereotype you'll have to re-do the toolbox entry.

Geert
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 04:04:51 pm
Hi Everyone,
Thanks a lot for all your help so far..
Just an FYI I have updated back to Icon and re-aligned the names, still with no sucess.
Geert - I don't know if this helps = I haven't changed the profile details for a number of days, since
I have been struggling with the profile names.

I am guessing the folder icon that is shown, is a default of some form?


<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
   <Documentation id="06BDE8B1-D" name="wuToolBox" version="1.0" notes="wuToolBox"/>
   <Content>
      <Stereotypes>
         <Stereotype name="ConceptualApplications" alias="ConceptualApplications" notes="Toolbox for Conceptual Model" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::Application" type="int" description="" unit="" values="" default="Application"/>
               <Tag name="wuProfile::DataStore" type="int" description="" unit="" values="" default="DataStore"/>
               <Tag name="wuProfile::Orchestration" type="int" description="" unit="" values="" default="Orchestration"/>
               <Tag name="wuProfile::DataFlow" type="int" description="" unit="" values="" default="DataFlow"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="ConceptualBusiness" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::CoreCapability" type="int" description="" unit="" values="" default="CoreCapability"/>
               <Tag name="wuProfile::SupportCapability" type="int" description="" unit="" values="" default="SupportCapability"/>
               <Tag name="wuProfile::ExternalOrg" type="int" description="" unit="" values="" default="ExternalOrg"/>
               <Tag name="wuProfile::InformationFlow" type="int" description="" unit="" values="" default="InformationFlow"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="ConceptualData" alias="ConceptualData" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::DataEntity" type="int" description="" unit="" values="" default="DataEntity"/>
               <Tag name="wuProfile::References" type="int" description="" unit="" values="" default="References"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="ConceptualDataToApp" alias="ConceptualXLinks" notes="" cx="90" cy="70" bgcolor="12632256" fontcolor="-1" bordercolor="-1" borderwidth="1" hideicon="0">
            <AppliesTo>
               <Apply type="ToolboxPage"/>
            </AppliesTo>
            <TaggedValues>
               <Tag name="wuProfile::IsCreatedBy" type="int" description="" unit="" values="" default="IsCreatedBy"/>
               <Tag name="wuProfile::IsUpdatedBy" type="int" description="" unit="" values="" default="IsUpdatedBy"/>
               <Tag name="wuProfile::IsStoredIn" type="int" description="" unit="" values="" default="IsStoredIn"/>
               <Tag name="wuProfile::IsDeletedBy" type="int" description="" unit="" values="" default="IsDeletedBy"/>
               <Tag name="wuProfile::IsCRUDBy" type="int" description="" unit="" values="" default="IsCRUDBy"/>
               <Tag name="wuProfile::IsArchivedFrom" type="int" description="" unit="" values="" default="IsArchivedFrom"/>
               <Tag name="wuProfile::IsSupportedBy(UML::Dependency)" type="int" description="" unit="" values="" default="IsSupportedBy"/>
            </TaggedValues>
         </Stereotype>
         <Stereotype name="wuProfile::IsSupportedBy(UML::Dependency)" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
            <Icon type="bitmap" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">Qk02AwAAAAAAADYAAAAoAAAAEAAAABAAAAABABgAAAAAAA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/w8PDwMDAAAAA
AgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA==</Icon>
            <AppliesTo>
               <Apply type="ToolBoxItemImage">
                  <Property name="isActive" value=""/>
               </Apply>
            </AppliesTo>
         </Stereotype>
      </Stereotypes>
      <TaggedValueTypes/>
   </Content>
</UMLProfile>
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 04:31:59 pm
Hi Geert,
I have checked my Meta types on the original profile element, on the Toolbox stereotype and on the image icon themselves and they are all defined, and in a consistent manner.

What I am curious about though, is I am getting some form of default for that Toolbox image (folder picture), so the connection is being made somehow, just the image is not being inserted.

Again many thanks everyone for your help thus far, I do appreciate it. I wish there was a bit more Sparx documentation on the subject, I am totally at a loss.

Title: Re: Sparx Toolbox Icon
Post by: KP on July 15, 2016, 04:43:57 pm
Well your icon is being encoded in the profile now, so that's progress. I have copy-pasted your icon into one of my own technologies, and the image is appearing in the project browser but not in the toolbox, so I suspect the toolbox doesn't like the bitmap format. Try saving from MS Paint as 24-bit bmp, that's what works for me.
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 15, 2016, 05:26:34 pm
Hmm that's interesting.  I created it through paint and it saves as 24 bit if I remember correctly.

If you have it working I wonder if it's some kind of configuration problem isolated to my machine.

Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 16, 2016, 06:10:51 am
#DefeatedBySparx

I gave up, worked into the early hours of the morning and still nothing, even having set it up on a different computer.
Thanks for all your help anyway guys, it was very reassuring to know there are many people out there willing to give up their free time helping others.
Title: Re: Sparx Toolbox Icon
Post by: qwerty on July 16, 2016, 06:30:21 am
Your BMP is 16x16 24 bpp format (just verified that). I'll see how the profile will work for me.

q.

Edit: your BMP is attached to a connector. Why?
Further: none of your stereos is defined correctly. They all show up with guillemets. That means the definition is wrong.
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 16, 2016, 09:21:18 am
Hi,
I am trying to change a dotted line into a solid line, quite trivial really, once I get that working I was going to change the colour as it would have a special meaning.

I have also tried it with normal element objects though, and the same problem, the default icon disappears, to be replaced by some picture of a folder where I have no idea where it comes from.
The functionality of the elements perform as they should, once dragged onto the Diagram. Their shape scripts work, etc. it is only the representation in the toolbox that is wrong.

Unfortunately this is one of the important items, as we are trying to consolidate the many connectors and elements, and make then intuitive to a particular group.

One thing I did notice, the toolbox.xml seems to get generated ok (I am assuming it is ok, but I have no way of confirming the text based XML version of the BMP is correct), but when it goes through MDG it seems to lose the image and gets replaced by another one (or at least different codes).


Is there something "special" I should be doing in MDG?
i.e. I am just selecting profile, toolbox and diagram XMLs, but NOT images, should I be doing something with images?
So much for me giving up - ;-)

I'm not sure how to add an attachment otherwise I would drop the ICON in here.

I appreciate your help.
Thanks,

Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 16, 2016, 11:02:57 am
An update - Whatever image is generated in the Toolbar.XML is also being successfully transferred to the output XML generated by the MDG process.
I got that wrong earlier.

So I would say the error is either in the Toolbar.XML generation process (Does anyone know if there is a way to confirm the image?) or somehow when I Import the MDG XML into the target Sparx, something is going wrong.
Title: Re: Sparx Toolbox Icon
Post by: Geert Bellekens on July 16, 2016, 04:24:55 pm
what you have posted is the toolbox profile right?

You should not define the icon on the toolbox, only on the actual stereotype.
On the toolbox it is enough to select the stereotype, you don't have to set any other fields on the toolbox items.
If on the stereotype you have filled in the Metatype and linked to a correct bitmap image then it will appear on the toolbox.

This really is quite simple you know, I think you are trying to do too much.

Below an example of a toolbox profile of mine
Code: [Select]
<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
<Documentation id="4F601B4B-B" name="BAM" version="1.0" notes="BAM"/>
<Content>
<Stereotypes>
<Stereotype name="BAM Instance" notes="Basic BAM instance Measures" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<AppliesTo>
<Apply type="ToolboxPage"/>
</AppliesTo>
<TaggedValues>
<Tag name="BAM::BAM_Specification(UML::Activity)" type="" description="" unit="" values="" default="Specification"/>
<Tag name="BAM::BAM_ProcessSection(UML::Action)" type="" description="" unit="" values="" default="Process Section"/>
<Tag name="BAM::BAM_StartMarker(UML::Action)" type="" description="" unit="" values="" default="Start Marker"/>
<Tag name="BAM::BAM_EndMarker(UML::Action)" type="" description="" unit="" values="" default="End Marker"/>
<Tag name="BAM::BAM_ComposedBasicMeasure(UML::Action)" type="" description="" unit="" values="" default="Composed Basic Measure"/>
<Tag name="BAM::BAM_Duration(UML::Action)" type="" description="" unit="" values="" default="Duration"/>
<Tag name="BAM::BAM_DataValue(UML::Object)" type="" description="" unit="" values="" default="Data Value"/>
<Tag name="BAM::BAM_Frequency(UML::Action)" type="" description="" unit="" values="" default="Frequency"/>
<Tag name="BAM::BAM_DataStateOccurence(UML::Action)" type="" description="" unit="" values="" default="Data State Occurence"/>
<Tag name="BAM::BAM_ExecutionStateOccurence(UML::Action)" type="" description="" unit="" values="" default="Execution State Occurence"/>
</TaggedValues>
</Stereotype>
<Stereotype name="BAM Process" notes="Process Measures" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<AppliesTo>
<Apply type="ToolboxPage"/>
</AppliesTo>
<TaggedValues>
<Tag name="BAM::BAM_Process(UML::Activity)" type="" description="" unit="" values="" default="Process"/>
<Tag name="BAM::BAM_AggregatedMeasure(UML::Action)" type="" description="" unit="" values="" default="Aggregated Measure"/>
<Tag name="BAM::BAM_ComposedAggregatedMeasure(UML::Action)" type="" description="" unit="" values="" default="Composed Aggregated Measure"/>
<Tag name="BAM::BAM_Filter(UML::Action)" type="" description="" unit="" values="" default="Filter"/>
<Tag name="BAM::BAM_TargetDefinition(UML::Action)" type="" description="" unit="" values="" default="Target Definition"/>
</TaggedValues>
</Stereotype>
<Stereotype name="BAM Actions and Dashboards" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<AppliesTo>
<Apply type="ToolboxPage"/>
</AppliesTo>
<TaggedValues>
<Tag name="BAM::BAM_ProcessAbortion(UML::Action)" type="" description="" unit="" values="" default="Process Abortion"/>
<Tag name="BAM::BAM_ProcessSuspension(UML::Action)" type="" description="" unit="" values="" default="Process Suspension"/>
<Tag name="BAM::BAM_ProcessTrigger(UML::Action)" type="" description="" unit="" values="" default="Process Trigger"/>
<Tag name="BAM::BAM_Notification(UML::Action)" type="" description="" unit="" values="" default="Notification"/>
<Tag name="BAM::BAM_Dashboard(UML::Action)" type="" description="" unit="" values="" default="Dashboard"/>
</TaggedValues>
</Stereotype>
<Stereotype name="BAM Relations" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<AppliesTo>
<Apply type="ToolboxPage"/>
</AppliesTo>
<TaggedValues>
<Tag name="BAM::BAM_Association(UML::Association)" type="" description="" unit="" values="" default="Association"/>
<Tag name="BAM::BAM_Flow(UML::ControlFlow)" type="" description="" unit="" values="" default="Flow"/>
<Tag name="ImagesOnly" type="" description="" unit="" values="" default="true"/>
</TaggedValues>
</Stereotype>
</Stereotypes>
<TaggedValueTypes/>
</Content>
</UMLProfile>

In the profile itself a single stereotype looks like this:
Code: [Select]
<Stereotype name="BAM_AggregatedMeasure" metatype="Aggregated Measure" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<Icon type="bitmap" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">Qk02AwAAAAAAADYAAAAoAAAAE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AcsUjuremVnYwGCM7tJfyTsC7v4gPZteNMjZBeC+fCwgnJ
M3pGbn16wF09wWrEZec/UEsBAhcLFAAAAAgAsHAkRwta0pP1AQAA/AYAAAcACQAAAAAAAAAA
AACAAAAAAHN0ci5kYXRVVAUABxSl6VVQSwUGAAAAAAEAAQA+AAAAKwIAAAAA</Image>
<AppliesTo>
<Apply type="Action">
<Property name="_tagGroupings" value="includeIdleTime=Duration;includeProcessingTime=Duration;includeSuspendedTime=Duration;"/>
<Property name="_tagGroups" value="Duration"/>
<Property name="context" value=""/>
<Property name="effect" value=""/>
<Property name="kind" value=""/>
</Apply>
</AppliesTo>
</Stereotype>

Geert
Title: Re: Sparx Toolbox Icon
Post by: qwerty on July 16, 2016, 04:28:46 pm
I have published a few articles about MDG here (http://liquit.biz/brain/enterprise.html). Maybe they can give you a bit insight.

q.
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 17, 2016, 01:02:54 pm
Thanks Geert and Qwerty.
Qwerty what I can see of you books looks great. Having a set of use cases that walk you through are what is needed I think in my opinion.  I'd certainly be interested in buying one. I am away from home for 1 week so I will check out when I get back.

Geert from what I can recall my steps were as follows :
I created a metatype toolboxitemimage.

I created a stereotype with the exact name as the element I referenced in the toolbox attribute to belong to the menu. In this stereo type I created an icon attribute which had the physical file and pathname. This stereo type was extent to the  toolboxitrmicon.

All of this was done following the one page example on the sparx web

site.http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/icons_for_toolbox_items.html

I will be interested however in comparing your scripts to mine on my return to identify the issues.

I do believe somehow the official documentation is flawed however and I only know what I read there.


Thanks everyone!
Gary
Title: Re: Sparx Toolbox Icon
Post by: Geert Bellekens on July 17, 2016, 05:28:14 pm
Gary,

They way you are doing is the hard way, in case you want the toolbox item to differ from the stereotype item.

The simple way is to set the icon on the stereotype (and not on the toolbox) and make sure to fill in the property metatype in the stereotype.

Then on the toolbox all you need to do is select the stereotype and you're done.

See also here:

http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/supportedattributes_2.html

Quote
icon
Contains the bitmap file location of the 16x16-pixel icon displayed beside all elements defined by the Stereotype, in the Project Browser. This does not apply to Package elements. The icon is also automatically used as the Diagram Toolbox image wherever the stereotyped element is listed.
For a transparent background, you can use light grey - RGB (192,192,192).
For this attribute to work correctly, also set the _metatype attribute.

Geert
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 17, 2016, 07:04:00 pm
Yes I'm with you Geert.
I'll give it a try as soon as I get home.
Thanks for your patience.
Title: Re: Sparx Toolbox Icon
Post by: DavidM on July 24, 2016, 05:30:07 am
Hi Geert/Query
Just to let you know I tried the suggestions yesterday of putting the icon attribute in the original
Sterotype of the element and unbelievably - IT WORKED FIRST TIME.

When I think of the wasted days I spent trying to make it work as per the official Sparx instructions.

This is a lot leaner and cleaner and simpler.
Thank you all very much. True consultants!

Which begs the questions,why or why or why is Sparx documentation to such a poor standard?

If what they are suggesting doesn't work,or if there is something in addition that needs to be done, they need to fix it.

Thanks again
Gary
Title: Re: Sparx Toolbox Icon
Post by: qwerty on July 24, 2016, 07:16:03 am
Being polite I'd say: they give us a chance to make a bit of our living by writing better documentation ;-) It's weekend, so keep on being polite! Happy to see it worked for you finally. I had been in that valley of tears and feel with you. Luckily I have the opportunity to cry out (very) loud from time to time without shocking someone else.

q.
Title: Re: Sparx Toolbox Icon
Post by: Geert Bellekens on July 25, 2016, 05:09:10 pm
To be fair, the "simple" way is also described somewhere in the help.
But being massive as it is it you can easily get lost in the documentation.

Geert