Book a Demo

Author Topic: Removing default decoration from non-UML extension  (Read 4253 times)

Mike Jacobs

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Removing default decoration from non-UML extension
« on: October 30, 2015, 06:01:03 am »
I am using the MDG technologies to extend non-UML elements.  Specifically, I am extending ArchiMate Application Function.  I have found that the default icon (the chevron pointing upwards in the upper right corner of the element) cannot be completely eliminated.  While I can load a 16x16 icon over it (using decoration in the shape script), portions of the default icon appear larger than 16x16 and show up around the edges of my icon.  I've gone so far as to add a rectangle subshape in an attempt to cover it, but the icon writes on top of that too.

How can I eliminate the default ArchiMate icon from my extension?

Thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Removing default decoration from non-UML exten
« Reply #1 on: October 30, 2015, 08:46:53 am »
I haven't tried this so don't know for sure if it will work, but if you knew the name of the decoration in the original shape script (which it just so happens I do) you could probably override it. So try adding this to your shape script:
Code: [Select]
decoration function
{
}
Please let us know if it works. (Actually, I'm beginning to suspect it won't...)
« Last Edit: October 30, 2015, 08:49:08 am by KP »
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Removing default decoration from non-UML exten
« Reply #2 on: October 30, 2015, 10:47:24 am »
Quote
I am using the MDG technologies to extend non-UML elements.  Specifically, I am extending ArchiMate Application Function.  I have found that the default icon (the chevron pointing upwards in the upper right corner of the element) cannot be completely eliminated.  While I can load a 16x16 icon over it (using decoration in the shape script), portions of the default icon appear larger than 16x16 and show up around the edges of my icon.  I've gone so far as to add a rectangle subshape in an attempt to cover it, but the icon writes on top of that too.

How can I eliminate the default ArchiMate icon from my extension?

Thanks
I ended up doing the same, but in my case the icon (for a UML component) occasionally "peeks out" from under the sub-shape.

It would be good to be able to suppress/replace the icon in a more architecturally correct way.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Mike Jacobs

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Removing default decoration from non-UML exten
« Reply #3 on: October 31, 2015, 01:47:48 am »
Thanks for your prompt replies.  The empty decoration idea did not work, however I did find a solution.  The image method parameters are not documented, so I toyed with them and found that the code below completely covers the default icon and eliminates the icon hanging outside of the element's rounded corner so it fits neatly inside the element now:

Code: [Select]
decoration icon {
      orientation= "NE";
      image ("cogwheels64x64.png", -10, 5, 95, 110);
}