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

喜夏-厌秋 提交于 2019-12-12 03:22:55

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/28808786/how-to-hide-the-label-of-a-diagram-link-in-enterprise-architect-using-add-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!