Did you ever get this to work? I have a drawing with blocks in it that I need to redefined with blocks from another single drawing. I was hoping to drag/drop using design center but it ignores duplicates.
I'm in Civil 3D 2012.. is there a tool to do this now?
Lisp works fine, but it expects the same number of blocks in the drawing and in the redefine folder.
Is it possible to have less blocks in the redefine folder. For example the drawing has blocks "tree", "pole" and "manhole" while I only want to redefine the "manhole" and "tree" block (only these are in the \\blocks\\ folder)....
If I run this lisp it stops working because it can't find the "pole" block in the redefine-folder.
I'm not a genius if it comes to Lisps.
thanks in advance.
@KristofDeRho wrote:
Lisp works fine, but it expects the same number of blocks in the drawing and in the redefine folder.
Is it possible to have less blocks in the redefine folder. For example the drawing has blocks "tree", "pole" and "manhole" while I only want to redefine the "manhole" and "tree" block (only these are in the \\blocks\\ folder)....
If I run this lisp it stops working because it can't find the "pole" block in the redefine-folder.
I'm not a genius if it comes to Lisps.
thanks in advance.
Perhaps something like this
(defun c:bup ( / BLK C1 CNT EL OLD_ECHO SST) (setq old_echo (getvar 'CMDECHO)) (SETVAR "cmdecho" 0) (setq sst (ssget "X" (list (cons 0 "INSERT")))) (if sst (progn (setq c1 0 cnt 0 ) (repeat (sslength sst) (setq el (entget (ssname sst c1)) c1 (+ 1 c1) blk (cdr (assoc 2 el)) ) (if (and (findfile (strcat "c:\\Blocks\\" blk ".dwg")) (setq blk (strcat blk "=c:\\Blocks\\" blk )) ) (progn (command ".insert" blk) (command) (setq cnt (1+ cnt)) ) ) ) ) (command "regen") ) (SETVAR "cmdecho" old_echo) (prompt (strcat "\n" (itoa cnt) " blocks were redefined")) (princ) )
HTH
Henrique