Visio) (Shape.Paths 属性

返回一个 Paths 集合,该集合报告在形状父级的坐标系统中该形状的路径的坐标。 此为只读属性。

语法

expressionPaths

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

返回值

Paths

示例

以下 Microsoft Visual Basic for Applications (VBA) 宏将一个形状放置在页面上,检索其 Paths 集合,然后使用 Path 对象的 Points 属性返回一个点数组,该数组定义一条接近于 Path 对象的折线。

 
Public Sub Paths_Example() 
 
 Dim vsoShape As Visio.Shape 
 Dim adblXYPoints() As Double 
 Dim strPointsList As String 
 Dim intOuterLoopCounter As Integer 
 Dim intInnerLoopCounter As Integer 
 
 Set vsoShape = ActivePage.DrawOval(1, 1, 4, 4) 
 
 For intOuterLoopCounter = 1 To vsoShape.Paths.Count 
 
 vsoShape.Paths(intOuterLoopCounter).Points 1#, adblXYPoints 
 For intInnerLoopCounter = LBound(adblXYPoints) To UBound(adblXYPoints) 
 strPointsList = strPointsList & adblXYPoints(intInnerLoopCounter) & Chr(10) 
 Next intInnerLoopCounter 
 
 Next intOuterLoopCounter 
 Debug.Print strPointsList 
 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。