Jump to content

Recommended Posts

Posted

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

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • ged

    11

  • chulse

    6

  • David Bethel

    3

  • Strix

    2

Top Posters In This Topic

Posted

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

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...