m
CAD实用LISP文件批量插块(defun c:insb(/ bs bn ts nl index bn c bp pt)
(setq bs(ssget))
(setq ts(getstring "\nEnter the name of symbol:"))
(setq nl(sslength bs))
(setq index 0)
(repeat nl
(setq bn(ssname bs index))
(setq bd(entget bn))
(setq c(assoc 10 bd))
(setq pt (cdr c))
(command "_insert" ts pt "4" "4" "")
(setq index (+ index 1))
)
(command "redraw")
(setq bs nil)
)