求助为何我使用SelectByPolygon acSelectionSetWindowPolygon所得到的选择集始终为空呢?
Public Sub click3(ByVal PickPoint As Variant)
Dim ss As AcadSelectionSet
Set ss = CreateSelectionSet("ModSet")
Dim i As Integer
Dim k As Integer
Dim j As Integer
Dim pickpt As Variant
On Error Resume Next
ss.SelectAtPoint PickPoint
Dim disptxt As String
If ss.Count > 0 Then
If LCase(ss.Item(0).ObjectName) = LCase("AcDbpolyline") Then
Dim gpnt As Variant
gpnt = ss.Item(0).Coordinates
Dim abc(3) As Double
abc(0) = 0
abc(1) = 1
abc(2) = 2
abc(3) = 3
Dim sss As AcadSelectionSet
Set sss = CreateSelectionSet("rico")
sss.SelectByPolygon acSelectionSetWindowPolygon, gpnt(abc(0))
If sss.Count 0 Then
MsgBox disptxt, , "123"
End If
End If
End If
End Sub
那个sss.count一直是0,所以msgbox disptxt,,“123”语句一直无法执行,求解答,谢谢。