Search code examples
enterprise-architect

Connection shape script shows GUID not a name of reference element


In my MDG technology I have a my own type of connection "MyConn" extended of InformationFlow. "MyConn" has tag "ServiceRef" which is linked via tagged value to another MDG element «MyService». When I use in "MyConn" shape script the construction

print(" -> ");
print("#TAG:ServiceRef#");

the shape depicts GUID of "MyService", not a "Name", as I experienced in other cases (for element, not connections).

Is there a way to show name of referenced element, not a GUID ? Sparx 13.5

enter image description here


Solution

  • That's obviously a(nother) bug in EA. It's still broken in 15.1. You might report that (or use your time for something more useful). Eventually post the question on Sparx' forum and one of the nice Sparxian (KP if any) will have an idea.

    Since shape script is so limited the only way around would be to use an add-in call to decipher the name from the GUID, just like

    print("#yourAddin:decipherGUID#");
    

    You would need to implement that decipherGUID operation in your add-in. If you desperately need that be aware that for each connector to be rendered EA will call that add-in. That can easily drop performance to non-usability.