WPS 基础接口 > 演示 API 参考 > Shape > 属性 > Shape.ConnectorFormat 属性
返回 ConnectorFormat 对象,包含连接符格式属性。适用于代表连接符的 ShapeShapeRange 对象。只读。

语法

表达式.ConnectorFormat

表达式   一个代表 Shape 对象的变量。

返回值
ConnectorFormat

示例

以下示例向 myDocument 中添加两个矩形,用一个连接符连接这两个矩形,并自动将连接符路径修改为最短路径,然后断开矩形间的连接符。

示例代码
let myDocument = ActivePresentation.Slides.Item(1)
let s = myDocument.Shapes
let firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)
let secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)
let cfmat = s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat
cfmat.BeginConnect (firstRect, 1)
cfmat.EndConnect (secondRect, 1)
cfmat.Parent.RerouteConnections()
cfmat.BeginDisconnect()
cfmat.EndDisconnect()


请参阅