双击时就有选择集了,你可能直接用该选择集(还剩下双点并操作后怎么防止特性框的出现和把选择集清除掉的操作)。
![](source/plugin/imc_colorcode/images/loading.gif) - Private Sub AcadDocument_BeginDoubleClick(ByVal PickPoint As Variant)
- Dim ss As AcadSelectionSet
- Dim i As Integer
- Dim txt As String
-
- Set ss = ThisDrawing.ActiveSelectionSet
- If ss.Count > 0 Then
- txt = "共选定了" & ss.Count & "个图元"
- For i = 0 To ss.Count - 1
- txt = txt & vbCrLf & "第" & i + 1 & "个图元名称:" & ss(i).ObjectName
- Next
- End If
- MsgBox txt
- End Sub
|