Book a Demo

Author Topic: Shapescripts for Provided/Required Interfaces  (Read 3290 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Shapescripts for Provided/Required Interfaces
« on: February 02, 2018, 06:14:21 pm »
Anybody else attempted to create shapescripts for RequiredInterface or ProvidedInterface elements?  They SURE are different, aren't they?

Among some of the issues we've found is that there is NO real distinction between Rectangular form and non-Rectangular form.  In fact, the drawnativeshape() only works for the Rectangular mode.
You can't change some of the drawing properties from within the shapescript - so that the behaviour of drawnativeshape() behaves differently than for most other element types.
Regardless of whether you define the MDG to have the base type in the metatype definition, it pops up the Provided/Required dialog (and it doesn't even change the radio button to the correct one)!

As part of our consistent modelling environment, we require each metatype to have a unique stereotype - so the stereotype is a proxy for the metatype.  If the user isn't watching what they are doing when they will create an inconsistent metatype.  Does anybody know how to suppress that dialog or at least to be able to specify the right interface type?

Thoughts?  (Before I report a set of bugs?)
Paolo


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

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Shapescripts for Provided/Required Interfaces
« Reply #1 on: February 02, 2018, 07:50:10 pm »
Hi Paolo
I've used this for a few clients MDG
Tried revisiting them, and these are my observations...

1. DrawParentShape seems to work with the lollypop notation
2. I have extended <<metaclass> RequiredInterface and <<metaclass>>ProvidedInterface and change colors , and i have 'edit object on new' off in my model, it doesn't seem to show me the popup dialog
(the drag / drop in diagram, however behaves different and treats the shape as a rectangle) (Unless I've forgotten a setting that i did during definition)

below is the definition from the final MDG

Code: [Select]
<Stereotype name="Provided" metatype="Provided" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">.......==</Image>
<AppliesTo>
<Apply type="ProvidedInterface"/>
</AppliesTo>
<TaggedValues>
<Tag name="Cycle" type="" description="" unit="" values="" default=""/>
</TaggedValues>
</Stereotype>