Barry Clark
24th Mar 2005, 09:07 pm
I am starting to use trig functions in my routines and I have hit a bump.
Any help in what I am doing will be greatly appeciated.
Where I think my problem is occurs at converting the input to usable data for the math. I just wasn't able to find where I could get the Dim argument and the Set argument to agree.
Sub PCoords()
Dim A As String, D As String
Dim X As String, Y As String
A = ThisDrawing.Utility.GetString(False, "Enter angle (degrees): ")
D = ThisDrawing.Utility.GetString(False, "Enter distance : ")
A = A * (pi / 180)
X = D * Cos(A)
Y = D * Sin(A)
MsgBox X & ", " & Y
End Sub
I couldn't find anything about this through the search function.
Any help would be greatly appreciated. Thanks!
Any help in what I am doing will be greatly appeciated.
Where I think my problem is occurs at converting the input to usable data for the math. I just wasn't able to find where I could get the Dim argument and the Set argument to agree.
Sub PCoords()
Dim A As String, D As String
Dim X As String, Y As String
A = ThisDrawing.Utility.GetString(False, "Enter angle (degrees): ")
D = ThisDrawing.Utility.GetString(False, "Enter distance : ")
A = A * (pi / 180)
X = D * Cos(A)
Y = D * Sin(A)
MsgBox X & ", " & Y
End Sub
I couldn't find anything about this through the search function.
Any help would be greatly appreciated. Thanks!