Author Topic: Sparx Toolbox Icon  (Read 18028 times)

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Sparx Toolbox Icon
« 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?


DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #1 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>
« Last Edit: July 16, 2016, 09:49:42 am by buczma »

VKN

  • EA User
  • **
  • Posts: 187
  • Karma: +9/-1
    • View Profile
Re: Sparx Toolbox Icon
« Reply #2 on: July 15, 2016, 03:03:27 pm »
Isn't the image supposed to be 16 x 16 pixels?

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #3 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>

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Sparx Toolbox Icon
« Reply #4 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.
« Last Edit: July 15, 2016, 03:19:16 pm by KP »
The Sparx Team
[email protected]

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Sparx Toolbox Icon
« Reply #5 on: July 15, 2016, 03:23:44 pm »
...plus, it needs to be "Icon" not "_Icon".
The Sparx Team
[email protected]

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #6 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. 

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13402
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Sparx Toolbox Icon
« Reply #7 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

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #8 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">Qk02AwAAAAAAADYAAAAoAAAAEAAAABAAAAABABgAAAAAAAADAADEDgAAxA4AAAAAAAAAAAAA
AAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAA
wcHBwMDAwMDAwcHBv7+/wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwcHBAAAAwMDA
wMDAv7+/wcHBwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwcHBv7+/wMDAwMDAAAAAwcHBwMDAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAv7+/wcHBwMDAwMDAwcHBAAAAwMDAwMDAwMDAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAgICv7+/v7+/wMDAwcHBv7+/wMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAvr6+AAAAxcXFv7+/ubm5wMDAwsLCvb29wMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAw8PDvb29AAAAwMDAxMTEw8PDv7+/AgICwMDAwMDAwMDAwMDA
wMDAwMDAwMDAwMDAvLy8xcXFv7+/AAAAv7+/v7+/v7+/AAAAwMDAwMDAwMDAwMDAwMDAwMDA
wMDAwMDAv7+/vb29w8PDwsLCAAAAxMTEu7u7AgICwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA
w8PDvb29w8PDvb29wsLCAAAAwsLCAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwsLCu7u7
wMDAxMTEurq6wMDAAQEBAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAv7+/w8PDwMDAAAAA
AgICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA==</Icon>
            <AppliesTo>
               <Apply type="ToolBoxItemImage">
                  <Property name="isActive" value=""/>
               </Apply>
            </AppliesTo>
         </Stereotype>
      </Stereotypes>
      <TaggedValueTypes/>
   </Content>
</UMLProfile>
« Last Edit: July 16, 2016, 09:50:19 am by buczma »

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #9 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.


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Sparx Toolbox Icon
« Reply #10 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.
The Sparx Team
[email protected]

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #11 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.


DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #12 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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Sparx Toolbox Icon
« Reply #13 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.
« Last Edit: July 16, 2016, 06:37:42 am by qwerty »

DavidM

  • EA User
  • **
  • Posts: 82
  • Karma: +0/-0
    • View Profile
Re: Sparx Toolbox Icon
« Reply #14 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,

« Last Edit: July 16, 2016, 10:11:33 am by garyamz »