-
- Sub PolarPointSample()
- Dim Pnt1 As Variant
- Dim Pnt2 As Variant
- Dim Ang As Double
- Dim Dist As Double
- Dim Msg As String
- Pnt1 = ThisDrawing.Utility.GetPoint(, vbCr & "起始点位置:")
- Ang = 0.7
- Dist = 50
- Pnt2 = ThisDrawing.Utility.PolarPoint(Pnt1, Ang, Dist)
- ThisDrawing.ModelSpace.AddLine Pnt1, Pnt2
- Update
- Msg = "起始点位置:X=" & Pnt1(0) & ",Y=" & Pnt1(1) & vbCrLf
- Msg = Msg & "目标点位置:X=" & Pnt2(0) & ",Y=" & Pnt2(1)
- MsgBox Msg, , "乐筑天下VBA示例"
- End Sub
|