问题描述
在Enterprise Architect中,用户可以在图表上隐藏/显示链接(连接器)的标签.关于EA的扩展(附加)开发,是否有一个功能,可以调用它来设置图上标签的可见性?
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?
推荐答案
您需要操纵 diagramLinks.Geometry
属性.当您有标签时,该字符串将包含类似
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
是包含名称的中间标签的一部分. LMB
用于构造型,其他 L
属性用于角色和基数.
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.
现在,您需要将 HDN = 0
更改为 HDN = 1
,以使标签不可见.
Now you need to change HDN=0
to HDN=1
to make the label invisible.
这篇关于如何使用外接程序在Enterprise Architect中隐藏图表链接的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!