Not sure if this is want you want
try this one for now
- (defun c:test(/ ppt1 ssob lys dwqty )(setvar 'cmdecho 0) (setq ppt1 (getpoint "\nPlace:")) (setq ssob (ssget)) (setq dwqty 0)(mapcar(function (lambda (j / k) (if (not (member (setq k (cdr (assoc 8 (entget j)))) lys)) (setq lys (cons k lys))) )) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ssob))) ) (foreach ln lys (sssetfirst nil ssob) (setq sellay (ssget "_p" (list (cons 8 ln)))) (command "_copy" sellay "" "" "_none" ppt1 (polar ppt1 (* pi (/ 45 180.0)) (setq dwqty (+ 50 dwqty))) ) ) )
I'm trying as much as possible not to deviate from your original code |