Book a Demo

Author Topic: Creating EA MDG Technology  (Read 4120 times)

WarrenKenyon

  • EA Novice
  • *
  • Posts: 13
  • Karma: +1/-1
    • View Profile
Creating EA MDG Technology
« on: February 11, 2017, 10:55:25 am »
Hi,

I am creating an extension to EA using the MDG Tech helpers.  I want to create some stereotypes the extend existing elements, just like any other MDG.

I am having some problems getting shapes scripts to do what I want.  The issue at hand is that I want to stereotype the Port element.  I want pretty much what a port already is, but I want the name of the element contained inside of the shape and have the "port" resize accordingly.  I simply cannot figure out how to get the port to be anything other than its default size. I can get the text to appear "centered" in the box, but of course it extends to the left and right.

There has to be a way to get this to work, right?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating EA MDG Technology
« Reply #1 on: February 11, 2017, 12:47:57 pm »
IIRC there is an _xxx attribute you can set in the MDG for a port, which works analogously to the Advanced/Custom Size you find in the context. But that slipped my mind. And EA's help is not very helpful in finding help topics.

q.

WarrenKenyon

  • EA Novice
  • *
  • Posts: 13
  • Karma: +1/-1
    • View Profile
Re: Creating EA MDG Technology
« Reply #2 on: February 14, 2017, 03:18:00 am »
Well, even if there is something specific to a Port, the question would still remain for any metatype:  How do you create a box that sizes to the contained text?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating EA MDG Technology
« Reply #3 on: February 14, 2017, 03:39:35 am »
You need some addin that resizes the element. I can't recall an API analogous to Alt-Z. But (IIRC) setting a too small size will make EA to take the smallest possible size.

q.