hello all,

Can you please guide me in this code. i write few codes to place block at point entity.

as i used "entsel ". it only allow to pick points not crossed window selection. below is my code. please dont give me link to download another lisp. i just write it using help file of AutoCAD. i want to know how can i do it in my lisp. there are several option on net to do so. but please guide me on this code.
keep in mind i am not expert in lisp
Code:
 
(defun c:bh1()
(setvar "OSMODE" 8)
(setq a (entsel "pick object"))
(setq b (cadr a))
(command "-insert" "BH" b "" "" "" "" "" "")
)