;BLKEDIT V.2.0 5-21-03 ;By Bill DeShawn bdeshawn@prodigy.net ;This is freeware ;Permission granted to distribute ;Permission denied to modify. Inform me. I'll do it. ;Not responsibile for any damage to anybody or anything caused by this code. ;Use at your own risk. ;If you don't get it from me, or from CADSYST, or CADDEPOT, it isn't mine. (defun blkediterr (msg) (if c:r (c:r) redraw) (setq ent nil elist nil blockname nil scl nil fn nil acadexe nil) (setq *error* olderr) (princ msg) (prompt ". Please try again.") (command "_.undo" "end") (princ) ) (defun c:blkedit (/ ent elist blockname ip fn redefiner acadexe) (command "_.undo" "g") (setq olderr *error*) (setq *error* blkediterr) (setq ent (entsel "\nSelect the block to edit: ")) (setq elist (entget (car ent))) (setq blockname (cdr (assoc 2 elist))) ; (setq ip (cdr (assoc 10 elist))) (setq fn (findfile (strcat blockname ".dwg"))) (if (null fn)(Alert " File not found")) (setq redefiner (strcat "=" fn)) (setq acadexe (findfile "acad.exe")) ; (startapp (strcat acadexe " /nologo " fn)) (cmdopen fn) (alert "Press OK when finished editing the block.") (command "insert" (strcat blockname redefiner) ^c) (setq *error* olderr) (command "_.undo" "end") (princ) )