怎么将point1改为P1,point2改为P2了!!!!- Sub calculateangel()
- Dim point1 As Variant
- Dim point2 As Variant
- point1 = ThisDrawing.Utility.GetPoint(, vbCrLf & "第一点:")
- point2 = ThisDrawing.Utility.GetPoint(point1, vbCrLf & "第二点:")
- Const pi As Single = 3.14
- Dim x As Double
- Dim y As Double
- Dim z As Double
- Dim ang1to2 As Double
- x = point1(0) - point2(0)
- y = point1(1) - point2(1)
- z = point1(2) - point2(2)
- ang1to2 = pi - Sgn(y) * pi / 2 - Atn(y / x)
- MsgBox "两点之间的方位角为:" & ang1to2, , "个计算单位"
- End Sub
|