Public Sub test1()
Dim line1 As AcadLine
Dim line2 As AcadLine
Dim pt As Variant
Dim intpoint As Variant
ThisDrawing.Utility.GetEntity line1, pt, "1"
ThisDrawing.Utility.GetEntity line2, pt, "1"
intpoint = line1.IntersectWith(line2, acExtendNone)
Debug.Print VarType(intpoint)
End Sub
无论直线是否相交,VarType(intpoint)的值均为8197
有无其它方法判断?