Book a Demo

Author Topic: MDG File / Interfaces Symbols does not work proper  (Read 3130 times)

floerio

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
MDG File / Interfaces Symbols does not work proper
« on: September 01, 2009, 05:24:54 pm »
Hi!

I have a profile defined with quite a lot of extended UML elements, working so far fine. BUT: I have trouble with the Interface elements.

I extended the metaclasses "RequiredInterface" and "ProvidedInterface" and added to each of them only the attribute "_metatype" to give them a proper name. Nothing else.

Now when I use these elements, the symbols behave strange: Instead, like the "originals", of moving arround on the outline of the component they initially do not even stick directly to the component.

Instead they "hang in the air" either to the left or right of the element. When I drag them towards the component, they can be moved but only exact to the middle of the element's line.

Does any body knows about this issue? Do I have to write a shape script with some supporting attributes/commands?

Cheers,
Oliver

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: MDG File / Interfaces Symbols does not work pr
« Reply #1 on: September 02, 2009, 08:59:55 am »
I think that you checked the "Element Size" option when saving your profile. If you do that and don't specify some sensible value with the _sizeX and _sizeY attributes then EA will either assume 90x70 (if you are saving from the package context menu) or the size of the stereotype class object (if you are saving from the diagram context menu).

Of course, there are no sensible values for exposed interface elements because they vary, being either 16x35 or 35x16 depending on which parent edge they are attached to. If you absolutely have to use the "Element Size" option, you could try writing a shape script that uses the defsize() command and the hasproperty("parentedge",... function.
The Sparx Team
[email protected]

floerio

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: MDG File / Interfaces Symbols does not work pr
« Reply #2 on: September 02, 2009, 04:00:45 pm »
;) Yepp, that did the trick!

Thank you very much!