Shape.Paths 屬性 (Visio)
會傳回 Paths 集合,以圖形父系的座標系統來報告圖形路徑的座標。 唯讀。
語法
expression。 Paths
表達 代表 Shape 物件的變數。
傳回值
Paths
範例
下列的 Microsoft Visual Basic for Applications (VBA) 巨集會在頁面上放置圖形、擷取其 Paths 集合,然後使用 Path 物件的 Points 屬性來傳回點陣列 (這些點陣列會定義與 Path 物件相似的 Polyline)。
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 支援與意見反應。