Code Red > AutoLISP (Vanilla / Visual)
overlay blocks
(1/1)
aswin:
hi.. Is there any way to place new blocks (overlay) on top of existing blocks without replacing..?
renkor:
Hello all,
Any suggestions to this?
ronjonp:
Try this:
--- Code - Auto/Visual Lisp: ---(defun c:foo (/ _dxf e o p s) ;; RJP » 2019-01-15 (defun _dxf (c e) (cdr (assoc c (entget e)))) (cond ((and (setq e (car (entsel "\nPick source block: "))) (= "INSERT" (_dxf 0 e)) (setq s (ssget ":L" '((0 . "insert")))) ) (ssdel e s) (setq p (_dxf 10 e)) (setq e (vlax-ename->vla-object e)) (foreach b (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq o (vla-copy e)) (vlax-invoke o 'move p (_dxf 10 b)) ;; (entdel b) ) ) ) (princ))
renkor:
Hello ronjonp,
It works perfectly, thanks!
ronjonp:
You're welcome! :)
Navigation
[0] Message Index
Go to full version