David Bethel Posted August 28, 2008 Posted August 28, 2008 Are you using full AutoCAD 2006? Have you been able to load the lisp routine? This one displays this block name as it is being processed so to indicate that it is working. (defun c:nestb2lay0 (/ tdef fe fd) (while (setq tdef (tblnext "BLOCK" (not tdef))) (and (/= (logand (cdr (assoc 70 tdef)) 4) 4) (princ (strcat "\n" (cdr (assoc 2 tdef)))) (setq fe (cdr (assoc -2 tdef))) (while fe (setq fd (entget fe)) (and (= "INSERT" (cdr (assoc 0 fd))) (/= "0" (cdr (assoc 8 fd))) (entmod (subst '(8 . "0") (assoc 8 fd) fd))) (setq fe (entnext fe))))) (prin1)) -David Quote
ASMI Posted August 28, 2008 Posted August 28, 2008 One more example: (defun c:bzero() (vl-load-com) (vlax-for b(vla-get-Blocks (setq actDoc(vla-get-ActiveDocument (vlax-get-acad-object)))) (vlax-for i b(vla-put-Layer i "0"))) (vla-Regen actDoc acAllViewports) (princ) ); end of c:bzero Quote
JONTHEPOPE Posted August 28, 2008 Posted August 28, 2008 Step 1 :put Above Code In Note Pad Step 2 :save As ***.lsp Step 3 :explorer Drag And Drop Into Acad Step 4 :type Bzero Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.