Curve.Start プロパティ (Visio)
Curve オブジェクトのパラメーター ドメインの開始値を返します。 読み取り専用です。
構文
式。開始
式Curve オブジェクトを表す変数。
戻り値
倍精度浮動小数点数
注釈
Curve オブジェクトの Start プロパティは、 曲線 のパラメーター ドメイン内の開始点の値を返します。 Curve オブジェクトは、パラメーター ドメインの観点からそれ自体を記述します。これは範囲 [Start(),End()]で、Start() は曲線の始点を生成します。 Start 値は座標ペアではないことに注意してください。 むしろ、始点の曲線に沿った相対位置を表します。 たとえば、直線の場合、Start の値は通常 0、End の値は 1 で、Curve オブジェクトの Point メソッドを使用して、始点と終点の間のポイントの相対位置を決定することで、曲線に沿った任意の点の座標を決定できます。
例
この Microsoft Visual Basic for Applications (VBA) マクロは、Start プロパティを使用して曲線の始点の値を表示する方法を示しています。 曲線の中点を探すために、Point メソッドを使用します。
Sub Start_Example()
Dim vsoShape As Visio.Shape
Dim vsoPaths As Visio.Paths
Dim vsoPath As Visio.Path
Dim vsoCurve As Visio.Curve
Dim dblStartpoint As Double
Dim dblEndpoint As Double
Dim dblX As Double
Dim dblY As Double
Dim intOuterLoopCounter As Integer
Dim intInnerLoopCounter As Integer
'Draw a shape and get its Paths collection.
Set vsoPaths = ActivePage.DrawOval(1, 1, 4, 4).Paths
'Iterate through the Path objects in the Paths collection.
For intOuterLoopCounter = 1 To vsoPaths.Count
Set vsoPath = vsoPaths.Item(intOuterLoopCounter)
Debug.Print "Path object " & intOuterLoopCounter
'Iterate through the curves in a Path object.
For intInnerLoopCounter = 1 To vsoPath.Count
Set vsoCurve = vsoPath(intInnerLoopCounter)
Debug.Print "Curve number " & intInnerLoopCounter
'Display the start point of the curve.
dblStartpoint = vsoCurve.Start
Debug.Print "Startpoint = " & dblStartpoint
'Display the endpoint of the curve.
dblEndpoint = vsoCurve.End
Debug.Print "Endpoint = " & dblEndpoint
'Find the midpoint of the curve.
vsoCurve.Point ((dblEndpoint - dblStartpoint) / 2), dblX, dblY
Debug.Print "Midpoint: x = " & dblx; ", y = " & dblY
Next intInnerLoopCounter
Debug.Print "This path has " & intInnerLoopCounter - 1 & " curve object(s)."
Next intOuterLoopCounter
Debug.Print "This shape has " & intOuterLoopCounter - 1 & " path object(s)."
End Sub
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。