閱讀英文

共用方式為


Curve.End 屬性 (Visio)

會傳回 Curve 物件的結束點。 唯讀。

語法

運算式結束

表達 代表 Curve 物件的變數。

傳回值

雙精度浮點數

註解

Curve 物件的 End 屬性會傳回曲線的結束點。 Curve 物件會根據其參數範圍來描述本身,也就是 [Start(),End()] 範圍,而其中的 End() 會產生此曲線的結束點。

範例

這個 Microsoft Visual Basic for Applications (VBA) 巨集會示範如何使用 End 屬性來決定曲線的結束點。

 
Sub End_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 intOuterLoopCounter As Integer 
 Dim intInnerLoopCounter As Integer 
 
 'Get the Paths collection for this shape. 
 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 
 
 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 支援與意見反應