How about it.
Of course it is not mine , I use any time I want to do a selection set
I comment it acording the idiom I use
;;*//*/*/*/*/*/*/*/*/*/*/*/*/**/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
;;;Copyright ©2005 - Marc'Antonio Alessi, Italy - All rights reserved
; http://xoomer.virgilio.it/alessi
;
(defun ALE_EntSelFilter (PrmStr FltLst / FlgSlt EntNam)
(setvar "ERRNO" 0)
(princ "\n_ ")
(prompt (setq PrmStr (strcat "\n" PrmStr ": ")))
(if
(while (not FlgSlt)
(if (setq EntNam (ssget "_:E:S" FltLst))
(not (setq FlgSlt T))
(if (= 52 (getvar "ERRNO"))
(setq FlgSlt T)
(alert
(strcat "\nUd no entendió lo que le pedí, pruebe de nuevo!" PrmStr )
;;; (strcat "\nYou did not understood what I ask for , try it again!" PrmStr )
)
) ;_if
) ;_if
) ;_while
(not (princ "\nFunction cancelled. "))
(ssname EntNam 0)
) ;_if
) ;_defun
;;usage
;;(ALE_EntSelFilter "Seleccione la poly del terreno" '((0 . "POLYLINE") (100 . "AcDb3dPolyline")))