Start / EndAngle properties example

Sub EndAngle_Example()

' This example adds an arc to the drawing and returns the start & end angles.

     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 dStartAngle As Double

     Dim dEndtAngle As Double

     dStartAngle = toDegrees(myArc.startAngle)

     dEndtAngle = toDegrees(myArc.endAngle)

     MsgBox "Start Angle = " & dStartAngle & Chr(13) & "End Angle = " & dEndtAngle

End Sub

 

Function toRadians(ByVal inDegrees As Double) As Double

  toRadians = inDegrees * 3.141592 / 180

End Function

 

Function toDegrees(ByVal inRadians As Double) As Double

  toDegrees = inRadians * 180 / 3.141592

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.