I am trying to work on selection sets. The code below is what I have used. But it does not show the selection window. It gives me a line from the first point to the second. How can get the user to see the selection window??
Public Sub SelectObject()
Dim ssetName As String
Dim objSet As AcadSelectionSet
Dim intMode As Integer
Dim ObjLayer As AcadLayer
Dim Pt1, Pt2
Dim dblPt3(0 To 2) As Double
Dim objEnt As Object
ssetName = "A1"
On Error Resume Next
' deleting existing sset A1 if any
ThisDrawing.SelectionSets("A1").Delete
Set objSet = ThisDrawing.SelectionSets.Add(ssetName)
intMode = acSelectionSetCrossing
frmMain.Hide
Pt1 = ThisDrawing.Utility.GetPoint(, "select lower left point to window selection set:")
Pt2 = ThisDrawing.Utility.GetPoint(Pt1, "select Upper Right point to window selection set:")
objSet.Select intMode, Pt1, Pt2
For Each objEnt In objSet
If TypeOf objEnt Is AcadEntity Then
Set ObjLayer = ThisDrawing.Layers.Add("ABC")
ObjLayer.color = acBlue
objEnt.Layer = "ABC"
End If
Next objEnt
ThisDrawing.SelectionSets.Item(ssetName).Delete
Application.Update
End Sub