This appears difficult.
I've tried the following, aiming to combine dlanor's code and Lee Mac's demo 1 in the link provided. The hybrid shown below doesn't work but I wouldn't know where to go from here.
I'm using the Snap function from Lee Mac and placing "LM:grsnap:snapfunction" below and in the same LISP file. I don't know if this is correct syntax in LISP.
Code:
(defun blkins (blkname) ;the name of the program or function must be defined in the first statement
(command "-INSERT" blkname (list 0. 0. 0.) 1 "" 0) ;"1" is the scale, "0" is the rotation
(setq ent (entlast) e_lst (entget ent)
osf (LM:grsnap:snapfunction)
osm (getvar 'osmode)
)
(setvar 'osmode 1)
(while (= (car (setq gr (grread T))) 5) ; grread: used to have a dynamic display while dragging the cursor position.
(princ "\nPick point: ")
(while (= 5 (car (setq grr (grread t 15 0))))
(redraw)
(osf (cadr grr) osm)
)
(if (listp (cadr grr))
(entmake (list '(0 . "POINT") (cons 10 (trans (osf (cadr grr) osm) 1 0))))
)
(redraw) (princ)
(entmod (subst (cons 10 (cadr gr)) (assoc 10 e_lst) e_lst))
)
(command "-rename" "block" blkname (strcat blkname "-" (rtos (getvar "cdate") 2 6))) ; rtos: Converts a number into a string strcat: Returns a string that is the concatenation of multiple strings
)
(defun LM:grsnap:snapfunction ( )
;etc.
;etc.