Try this:
- (defun c:Test (/ ss) ;; Tharwat 20.09.2015 ;; (cond ((vl-some '(lambda (l) (not (tblsearch "LAYER" l))) '("Layer2" "Layer3")) (alert "One of the two layers is not found < Layer2 / Layer3 > :")) ((and (princ "Select Block to copy two times :") (setq ss (ssget "_:L" '((0 . "INSERT") (2 . "ttblok")))) ) ((lambda (x / sn) (while (setq sn (ssname ss (setq x (1+ x)))) (mapcar '(lambda (u) (entmake (append (list '(0 . "INSERT") '(2 . "ttblok") (cons 8 u)) (vl-remove-if-not '(lambda (v) (member (car v) '(6 10 41 42 43 50 62 370)) ) (entget sn) ) ) ) ) '("Layer2" "Layer3") ) ) ) -1 ) ) ) (princ))
|