Shape.Paths プロパティ (Visio)

親図形の座標系での図形のパスの座標を示す Paths コレクションを返します。 読み取り専用です。

構文

Paths

Shape オブジェクトを表す変数。

戻り値

Paths

この VBA (Microsoft Visual Basic for Applications) マクロは、ページに図形を配置し、その 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 のサポートおよびフィードバックを参照してください。