Siavash
Siavash

Reputation: 91

How to hide the label of a diagram link in Enterprise Architect using Add-in?

In Enterprise Architect, user can hide/show the labels of links (connectors) on a diagram. Concerning extension (add-in) development for EA, is there a function that calling it can set the visibility of a label on the diagram(s)?

Or in another more general word, how is it possible to retrieve the list of the labels of a connector programmatically?

Upvotes: 0

Views: 673

Answers (1)

qwerty_so
qwerty_so

Reputation: 36333

You need to manipulate the diagramLinks.Geometry property. When you have a label this string will contain something like

LMT=CX=6:CY=13:OX=42:OY=9:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;

LMT is the part for the middle label which contains the name. LMB is for the stereotype and other L-attributes are for roles and cardinality.

Now you need to change HDN=0 to HDN=1 to make the label invisible.

Upvotes: 3

Related Questions