Dim angle As Double Dim QD As Variant, QDucs As Variant, ZD As Variant QD = ThisDrawing.Utility.GetPoint QDucs = ThisDrawing.Utility.TranslateCoordinates(QD, acWorld, acUCS, False) ZD = ThisDrawing.Utility.GetPoint(QDucs) angle = ThisDrawing.Utility.AngleFromXAxis(QD, ZD) UserForm1.TextBox3.Text = Str(angle * 180 / PI) 这段代码是实现通过选取两个点来获取角度的 在选点的时候就有橡皮筋 |