Friday, August 11, 2006

AutoLISP sample code for xclipped blocks

Here is a sample AutoLISP code that shows how to identify xclipped blocks.

(defun xclippedblocks (/ lst ss i ent ed xc)
  (if (setq ss (ssget "X" '((0 . "INSERT"))))
    (progn
      (setq i 0)
      (while (setq ent (ssname ss i))
       (setq ed (entget ent))
       (cond
         ((setq xc (member '(102 . "{ACAD_XDICTIONARY") ed))
          (setq xc (cdr (cadr xc)))
          (cond
            ((dictsearch xc "ACAD_FILTER")
             (setq lst (cons (cdr (assoc 2 ed)) lst))
            )
          )
         )
       )
       (setq i (1+ i))
      )
    )
  )
  lst
)

 

tags:

No comments:

Post a Comment

Subscribe to the comments feed

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Subscribe to this blog
JTB World's website | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.