EndPoint property example

 

Sub EndPoint_Example()

' This example adds an arc to the drawing and returns it's StartPoint & EndPoint.

    Dim myArc As AcadArc

    Dim ctrPt(0 To 2) As Double

    ctrPt(0) = 5: ctrPt(1) = 3

    'Add the arc to the .dwg

    Set myArc = ThisDrawing.ModelSpace.AddArc(ctrPt, 2.5, toRadians(15), toRadians(105))

    ' Display the entity

    myArc.Update

    ThisDrawing.Application.ZoomExtents

    Dim vStartPoint As Variant: vStartPoint = myArc.StartPoint

    Dim vEndtPoint As Variant: vEndtPoint = myArc.EndPoint

    MsgBox "The arc has following start/end coordinates:" & _

    Chr(13) & "start point: " & vStartPoint(0) & ", " & vStartPoint(1) & ", " & vStartPoint(2) & _

    Chr(13) & "  end point: " & vEndtPoint(0) & ", " & vEndtPoint(1) & ", " & vEndtPoint(2)

End Sub

 

Function toRadians(ByVal inDegrees As Double) As Double

  toRadians = inDegrees * 3.141592 / 180

End Function

 


Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved.