Visio) (Curve.Start 屬性

傳回 曲線 物件參數範圍的開頭。 唯讀。

語法

運算式。開始時間

運算式 代表 Curve 物件的變數。

傳回值

雙精度浮點數

註解

曲線物件的Start 屬性會傳回曲線參數域中起點的值。 曲線 物件會 根據其參數範圍來描述自己,也就是範圍 [Start () ,End () ],其中 Start () 會產生曲線的起點。 請注意, [起始] 值不是座標對。 相反,它代表沿起點曲線的相對位置。 例如,對於一條線來說,[開始點] 的值通常為 0,而 [結束] 的值為 1,而您可以使用曲線物件的 [點] 方法,藉由判斷點在起點與端點之間的相對位置,來決定曲線上任何點的座標。

範例

這個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 支援與意見反應。