stenna Posted June 26, 2013 Posted June 26, 2013 Morning again, Is there a lisp or piece of code that would change the contents of a block to Layer 0, so I can set it down in my Layering Standard rather than the standard the block was created in (not by me). Look forward to hearing from you Stenna Quote
ReMark Posted June 26, 2013 Posted June 26, 2013 Take a look at this thread and pay particular attention to Lee Mac's response (and code) in post #6. http://www.cadtutor.net/forum/showthread.php?50422-Change-layer-of-Block-Elements Quote
Tharwat Posted June 26, 2013 Posted June 26, 2013 Almost the same like the one that I have posted in your second thread with a little modifications to suit the needs . (vl-load-com) (defun c:2lay0 (/ b o) ;;--- Tharwat 26.June.2013 ---;; (or doc (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))) (vlax-for b (vla-get-blocks doc) (if (and (eq :vlax-false (vla-get-isLayout b)) (eq :vlax-false (vla-get-isXref b)) ) (vlax-for o b (vla-put-layer o "0") ) ) ) (vla-regen doc acAllViewports) (princ) ) 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.