
Originally Posted by
ALe
here test result: working perfectly!
I changed the lisp code in order to suit to my needs (the variables "Etichetta Locale" and "Area Stanza" are given by default).
the strange thing is that the original code works for this line
oSset.SelectOnScreen fType, fData
but this update doesn't work
oSset.Select acSelectionSetAll, , , fType, fData
and I don't understand why. But this is another issue...
Thank you Oleg.
You're welcome 
You have to zoom drawing to extents before selection,
and define selection mode explicitly,
Something like, i.e.:
Dim oSset As AcadSelectionSet
Set oSset = ThisDrawing.SelectionSets.Add("$Plines$")
ZoomExtents
Dim mode As Integer
mode = acSelectionSetAll
Dim vt(0 To 2) As Integer
vt(0) = 0: vt(1) = 70: vt(2) = 410
Dim curTab As Variant
curTab = ThisDrawing.GetVariable("CTAB")
oSset.Select mode, , , vt, Array("LWPOLYLINE", 1, CStr(curTab))
MsgBox "Selected " & oSset.Count & " closed polylines"
oSset.Delete