Author Topic: MDG: default label (name) for connector  (Read 3611 times)

L.Krobot

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
MDG: default label (name) for connector
« on: August 12, 2015, 07:54:28 pm »
Hi,

anyone knows how to set the (default) Name (label) for the new connector that will be created form MDG connector stereotype ?

Basically, this should replicate the same behavior that works for the elements (i.e. when you drag and drop element from toolbox onto diagram, you get default name, plus sequence number, as specified in your MDG; the same thing (possibly without sequence number) would be (is) required also for connectors)  ...

PS
using the label middletoplabel & print in shape script does not work - it prints fix text label, but does not set connector Name ...

any idea ?

thx,
ljk

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: MDG: default label (name) for connector
« Reply #1 on: August 12, 2015, 09:21:24 pm »
Hello,


I'm pretty sure you can't get EA to do this, since it does not normally set a default name on connectors. If you look in Settings -- Auto Names and Counters, you will note that EA can apply auto naming to elements, diagrams, various EA-specific things like tasks and issues - but not to connectors.

What you can do is create an Add-In which responds to the EA_OnPostNewConnector event by checking if the newly created connector has a name and, if not, sets it according to your own rules.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.