Visio VBA: 将线条形状连接到其他两个形状

Visio VBA : Connect a line shape to two other shapes

我通过 VBA 用户表单将形状拖放到我的页面上。其中,我需要删除一个 "curved line" 形状,它应该连接两个指定的形状。

我找到了如何直接创建连接的方法here,但我想要来自我的特定母版的形状,因为它有一些自定义数据属性。

我希望连接器形状的数据表中有一些字段,我可以在其中引用开始和结束形状?找不到更有帮助的东西。

感谢任何提示!

来自here

的解决方案
Dim shp As Visio.Shape 'connector
Dim src As Visio.Shape 'connect this
Dim aim As Visio.Shape 'to this

[...] 'Set shape variables

shp.Cells("BeginX").GlueTo src.Cells("PinX")
shp.Cells("EndX").GlueTo aim.Cells("PinX")