具体内容请参加下面的贴子: dispbbs.asp?boardID=14&ID=48355&page=1
下面是我写的一段测试代码: Public Sub test() On Error GoTo LAST Dim sset As AcadSelectionSet Set sset = ThisDrawing.SelectionSets.Add("Exapmle") sset.SelectOnScreen If sset.Count = 2 Then Dim ent1 As AcadEntity, ent2 As AcadEntity Set ent1 = sset.Item(0) Set ent2 = sset.Item(1) Dim pt As Variant pt = ent1.IntersectWith(ent2, acExtendNone) If UBound(pt) < 0 Then MsgBox "无交点" Else MsgBox "有交点" End If End If LAST: sset.Delete End Sub
|