GetAngle Example |
Using Programming Languages other than VBA
Sub Example_GetAngle() ' This example demonstrates 4 different ways to retrieve ' an angle from the user using the GetAngle method. Dim retAngle As Double ' Return the angle in radians with a prompt retAngle = ThisDrawing.Utility.GetAngle(, "Enter an angle: ") MsgBox "The angle entered was " & retAngle, , "GetAngle Example" ' Return the angle in radians without any prompt retAngle = ThisDrawing.Utility.GetAngle() MsgBox "The angle entered was " & retAngle, , "GetAngle Example" ' Return the angle in radians with a prompt and an angle base point Dim basePnt(0 To 2) As Double basePnt(0) = 2#: basePnt(1) = 2#: basePnt(2) = 0# retAngle = ThisDrawing.Utility.GetAngle(basePnt, "Enter an angle: ") MsgBox "The angle entered was " & retAngle, , "GetAngle Example" ' Return the angle in radians with an angle base point but no prompt retAngle = ThisDrawing.Utility.GetAngle(basePnt) MsgBox "The angle entered was " & retAngle, , "GetAngle Example" End Sub
Comments? |