GetAngle method example
Sub GetAngle_Example()
Dim retAngle As Double
Dim pt(0 To 2) As Double: pt(0) = 3: pt(1) = 3: pt(2) = 0
Dim nDec As Integer: nDec = ThisDrawing.GetVariable("AUPREC")
retAngle = ThisDrawing.Utility.GetAngle(pt, "Enter an angle: ")
retAngle = Math.Round(toDegrees(retAngle), nDec)
MsgBox "The angle entered was " & retAngle & "°", , "GetAngle Example"
End Sub
Private Function toDegrees(ByVal inRadians As Double) As Double
toDegrees = inRadians * 180 / 3.141592
End Function
© Bricsys NV. All rights reserved. |